问题
I have an azure project with a dedicated cache role for session. With azure cache 2.2 and lower it works just fine but when I upgrade it fails with the following error. I downgrade and it works again.
[SocketException (0x2af9): No such host is known]
Microsoft.ApplicationServer.Caching.AsyncResultNoResult.EndInvoke() +217 Microsoft.ApplicationServer.Caching.TcpClientChannelFactory.TcpConnectionCallback(IAsyncResult result) +163[DataCacheException: ErrorCode:SubStatus:There is a temporary failure. Please retry later.... Additional Information : The client was trying to communicate with the server: net.tcp://CacheWorkerRole:24233
The error doesn't seem to lead to anything that has worked.
Ideas?
Web config
<dataCacheClients>
<dataCacheClient name="default">
<autoDiscover isEnabled="true" identifier="CacheWorkerRole" />
</dataCacheClient>
</dataCacheClients>
<sessionState mode="Custom" customProvider="SessionProvider">
<providers>
<add name="SessionProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" dataCacheClientName="default" applicationName="MIS" />
</providers>
</sessionState>
回答1:
Please ensure that your cloud service is using SDK Version 2.3. Based on the Nuget Package page here: http://www.nuget.org/packages/Microsoft.WindowsAzure.Caching/, this version of caching will only work with Azure SDK Version 2.3.
来源:https://stackoverflow.com/questions/22853191/azure-cache-2-2-works-but-2-3-x-doesnt