我刚刚安装
Velocity
在我的电脑上,除了我无法向缓存中添加任何对象外,一切似乎都很正常。检索缓存本身没有问题,但当我尝试添加一个对象时,所有内容都会冻结五分钟,然后我会超时。
连接到缓存主机的代码(工作正常):
// Define Array for 1 cache host.
ServerEndPoint[] servers = new ServerEndPoint[1];
// Specify Cache Host Details
servers[0] = new ServerEndPoint(
"COMPUTERNAME" /* Host */,
22233 /* Port */,
"DistributedCacheService" /* Service name */);
// Pass configuration settings to CacheFactory constructor.
m_cacheFactory = new CacheFactory(servers,
true /* Use routing client */,
false /* No local cache */);
// Get the cache (works fine).
Cache cache = m_cacheFactory.GetCache("MyCache");
我向缓存中添加对象的代码(不起作用):
// Get the cache.
Cache cache = m_cacheFactory.GetCache("MyCache");
// Create the item to put in the cache.
Product product = new Product();
product.Sku = "10000";
product.Name = "My Product";
// Put the object in the cache (The add method doesn't work either).
cache.Put(product.Sku /* Key */, product /* Value */);
通过集群管理员界面,我已经验证了缓存主机正在运行,并且缓存本身存在。
有人知道问题是什么吗?
编辑:
我将日志接收器提供程序连接到缓存工厂,并验证了是否存在某种超时。缓存主机在我的本地计算机上,防火墙已关闭。
CASClient-尝试交谈时超时
向
网。tcp://l1441gbg:22233/distributedcacheservice,速度。DRM。发送接收,警告,2008-11-20
11:06:29.988