none
Windows Server AppFabric 1.1 无法向缓存中添加数据 RRS feed

  • 问题

  • 在一台内网服务器上部署了Windows Server AppFabric 1.1,硬件防火墙也增加了22233的端口映射,服务端也执行了

    Set-CacheClusterSecurity -SecurityMode none -ProtectionLevel none

    指令,按理说,应该没有其他需要设置的了,执行了

    Get-Cache

    指令,是可以看到是有 default 缓存的,执行下面的代码,可以获得 default 缓存对象,但无法向里面添加数据,会报异常。

    DataCacheServerEndpoint[] servers = new DataCacheServerEndpoint[1];
                servers[0] = new DataCacheServerEndpoint("xxx.xxx.xxx.xxx", 22233);
    
                // Setup the DataCacheFactory configuration.
                DataCacheFactoryConfiguration factoryConfig = new DataCacheFactoryConfiguration();
                factoryConfig.SecurityProperties = new DataCacheSecurity(DataCacheSecurityMode.None, DataCacheProtectionLevel.None);
                factoryConfig.Servers = servers;
                
                // Create a configured DataCacheFactory object.
                DataCacheFactory dataCacheFactory = new DataCacheFactory(factoryConfig);
                
    
                // Get a cache client for default cache.
                DataCache defaultCache = dataCacheFactory.GetDefaultCache();
                defaultCache.Add("key", "value");

    异常信息如下:

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

    可以确认的两点是,端口是通的,因为如果我写错缓存名称,会报另外一个异常,服务也是正常工作的,程序部署在内网是可以正常操作缓存中的数据的。

    不知道我在使用上是否还有其他的问题。

    2014年10月11日 2:49

全部回复