AppFabric错误ERRCA0017 SubStatus ES0006

时间:2012-10-31 21:02:53

标签: appfabric appfabric-cache

刚刚在我的Windows 7机器上安装了Windows Server AppFabric 1.1,我正在尝试在控制台应用程序中针对缓存客户端API编写一些代码作为AppFabric评估的一部分。我的app.config如下所示:

  <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 cmdlet Grant-CacheAllowedClientAccount将我的域用户帐户添加为允许的客户帐户。我正在创建一个新的DataCache实例:

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.)

如果有人能够指出我缺少什么来使这项工作,我将非常感激。

1 个答案:

答案 0 :(得分:0)

终于弄明白我的问题是在几乎扯掉我留下的小头发之后。最初,我正在创建我的DataCache:

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

事实证明,DataCache不喜欢让DataCacheFactory创建它。一旦我重构了代码,只要我需要我的DataCache,我的DataCacheFactory就会保留在范围内,它按预期工作。