用于将 Azure AppFabric 缓存服务用作 NHibernate 的二级缓存的 NHibernate.Caches.Appfabric nuget 包在 Azure SDK 的 V 1.8 中运行良好。
但是,在升级到 VS 2012 和 Azure SDK 2.0 版后,nuget 包已停止工作,并且 AppFabric DLL 无法与 Azure AppFabric 缓存服务建立连接。连接到 Azure AppFabric 缓存服务时出现以下错误:
Exception type: DataCacheException
Exception message: 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://192.168.171.9:20005.
在 Microsoft.ApplicationServer.Caching.DataCacheFactory.EstablishConnection(IEnumerable 1 servers, RequestBody request, Func
3 sendMessageDelegate, DataCacheReadyRetryPolicy retryPolicy) 在 Microsoft.ApplicationServer.Caching.DataCacheFactory.ThrowException(ErrStatus errStatus, Guid trackingId, Exception responseException, Byte[][] payload, EndpointID destination) 在 Microsoft .ApplicationServer.Caching.SocketClientProtocol.Initialize(IEnumerable 1 servers)
at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName, CreateNewCacheDelegate cacheCreationDelegate, DataCacheInitializationViaCopyDelegate initializeDelegate)
at NHibernate.Caches.AppFabric.AppFabricCacheFactory.GetCache(String cacheName, Boolean useDefault)
at NHibernate.Caches.AppFabric.Adapters.AppFabricCacheNamedAdapter.GetCache(IAppFabricCacheFactory cacheFactory)
at NHibernate.Caches.AppFabric.AppFabricCacheAdapter..ctor(String regionName)
at NHibernate.Caches.AppFabric.Adapters.AppFabricCacheNamedAdapter..ctor(String regionName)
at NHibernate.Caches.AppFabric.AppFabricCacheAdapterFactory.Create(String regionName)
at NHibernate.Caches.AppFabric.AppFabricProvider.BuildCache(String regionName, IDictionary
2 properties) at NHibernate.Cache.CacheFactory.CreateCache(String usage, String name, Boolean mutable, Settings settings, IDictionary`2 properties) at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg、IMapping 映射、Settings 设置、EventListeners 监听器)
==================================================== ===
你能建议如何解决这个问题吗?
谢谢