2012-10-31 41 views
0

剛剛在我的Windows 7盒子上安裝了Windows Server AppFabric 1.1,我試圖在控制檯應用程序中針對緩存客戶端API編寫一些代碼,作爲AppFabric評估的一部分。我的app.config如下所示:AppFabric錯誤ERRCA0017子狀態ES0006

<configSections> 
    <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" /> 
    </configSections> 
    <dataCacheClient> 
    <hosts> 
    <host name="pa-chouse2" cachePort="22233" /> 
    </hosts> 
</dataCacheClient> 

我創建了一個新的緩存,並加入我的域用戶帳戶作爲使用PowerShell命令格蘭特CacheAllowedClientAccount允許的客戶帳戶。我創建一個新的數據高速緩存的實例,像這樣:

using (DataCacheFactory cacheFactory = new DataCacheFactory()) 
{ 
    this.cache = cacheFactory.GetDefaultCache(); 
}  

當我打電話DataCache.Get,我結束了以下異常:

ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.) 

,我會很感激,如果任何人都可以點我錯過了什麼讓這個工作。

+0

嘗試設置IP地址而不是主機名。 – Natalya

+0

感謝您的迴應,但切換到IP地址導致相同的錯誤。 –

回答

0

終於搞清楚我的問題是什麼後,幾乎撕掉我留下的小毛髮。起初,我創造我的數據高速緩存,像這樣:

using (DataCacheFactory cacheFactory = new DataCacheFactory()) 
{ 
    this.cache = cacheFactory.GetDefaultCache(); 
} 

事實證明,數據高速緩存不喜歡具有DataCacheFactory創建它處理掉。一旦我重構代碼,以便我的DataCacheFactory保持在範圍內,只要我需要我的DataCache,它就按預期工作。