刚刚在我的 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.)
如果有人能指出我缺少什么以使其正常工作,我将不胜感激。