我正在尝试使用Azure,并尝试使用缓存功能.我创建了一个云服务项目,并添加了一个缓存工作者角色和一个Web角色.我将"Windows Azure Caching"nuget安装到两个角色的项目中,并在Web角色的web.config中的DataCacheClients元素中添加了缓存工作者角色的名称作为标识符.
我将以下代码添加到Web角色中:
DataCacheFactory cf = new DataCacheFactory();
DataCache c = cf.GetDefaultCache();
Run Code Online (Sandbox Code Playgroud)
当我尝试在模拟器上本地运行它时,我得到以下异常:
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.).
Additional Information : The client was trying to communicate with the server: net.tcp://MvcWebRole1:24233.
Inner Exception : No such host is known
Run Code Online (Sandbox Code Playgroud)
你能告诉我我在这里缺少什么吗?
使用的Azure SDK:v2.0
小智 14
你问题的时间安排不可能更好.我们也面临着完全相同的问题,并且对于问题可能是什么感到震惊.我们有一个项目,一切都工作得非常好,在一个项目中我们得到了同样的错误.根据我们的研究,我们已经确定了Nuget包用于缓存的问题.似乎昨天发布了新版本(2.1.0.0),我们发现如果我们安装该软件包,就会出现此错误.你可以检查你的包装版本吗?该文档指出,此新版本只能与今天发布的最新SDK(2.1)一起使用.
一种解决方案是卸载2.1.0.0版并安装2.0.0.0版.要安装2.0.0.0版,请打开Package Manager Console(View --> Other Windows --> Package Manager Console
)并在其中键入以下命令:
Install-Package Microsoft.WindowsAzure.Caching -Version 2.0.0.0
Run Code Online (Sandbox Code Playgroud)
这解决了我们的问题.希望它也能解决你的问题.
归档时间: |
|
查看次数: |
3555 次 |
最近记录: |