2013-02-14 2 views
0

구성을 수행하기 위해 C# 코드를 사용하면 AppFabric을 내 Asp.net 응용 프로그램에서 작동 시키려고합니다. 모든 것이 잘 작동합니다. 하지만 web.config에서 작동하도록하는 데 어려움을 겪고 있습니다. 실제로 캐시에 아무것도 넣지 않습니다 그러나 기본 캐시에 처하고 그 다음 내 코드는 예외를 throw하지 않습니다에서 web.config에 다음,DataCacheClient 대 dataCacheClient의 AppFabric 구성 문제

<section name="dataCacheClient" 
      type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, 
     Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, 
     Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
      /> 

<dataCacheClient> 
    <hosts> 
    <host name="localhost" cachePort="22233" /> 
    </hosts> 
</dataCacheClient> 

가있는 경우, 제가

<section name="dataCacheClients" 
      type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, 
     Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, 
     Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
      /> 

N까지의 Web.config 변경하면 바이트 수는 0

이다

는 IT의 "dataCacheClients"는 "S"와

<dataCacheClients> 
<dataCacheClient name="default"> 
    <hosts> 
    <host name="localhost" cachePort="22233" /> 
    </hosts> 
</dataCacheClient> 

내가 예외를 가지고 otice

ErrorCode<ERRCA0021>:SubStatus<ES0001>:Server collection cannot be empty 

사람은 내가 여기에 누락 무엇을 지적하는 데 도움 수 없습니다.

정말 고마워요!

답변

1

첫 번째 예는 정확합니다. 매개 변수를 추가하십시오. allowLocation = "true" allowDefinition = "Everywhere".

<section name="dataCacheClient" 
     type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, 
       Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, 
       Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
     allowLocation="true" 
     allowDefinition="Everywhere"/>