Windows Server AppFabric 1.1在为.Net Framework 4.0或更高版本编译项目时缓存客户端异常 [英] Windows Server AppFabric 1.1 Caching client exception when project is compiled for .Net Framework 4.0 or higher

查看:79
本文介绍了Windows Server AppFabric 1.1在为.Net Framework 4.0或更高版本编译项目时缓存客户端异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我决定将dev appfabric缓存集群服务器和我的本地客户端升级到v 1.1。在2个新的新VM上重新安装服务器,打开所有端口,设置安全性,发现需要打开两个服务器上的额外端口(ICMPv4
8 - 0)才能让群集主机相互通信。 / p>

当我在工作站上删除了v 1.0客户端并安装了v 1.1客户端时,我在执行此行时开始出现以下错误:


cacheFactory.GetCache(QUOT;默认");


类型 'Microsoft.ApplicationServer.Caching.HostNodeDomainConfigurationElementCollection' 是无效的集合类型,因为它不具有有效的添加方法与参数类型'System.Object'


事实证明,如果我将目标框架设置为3.5,那么一切正常,当4.0或更高时(我在这个工作站上并排运行VS11) ),它会中断。


               列表与LT; DataCacheServerEndpoint>服务器=新列表与LT; DataCacheServerEndpoint>(1);

                servers.Add(new DataCacheServerEndpoint(" dev-app-01",22233));

                 servers.Add(new DataCacheServerEndpoint(" dev-app-02",22233));

                 DataCacheFactoryConfiguration配置=新DataCacheFactoryConfiguration();

                configuration.Servers = servers;

                configuration.LocalCacheProperties =新DataCacheLocalCacheProperties();

                configuration.SecurityProperties =新DataCacheSecurity(DataCacheSecurityMode.None,DataCacheProtectionLevel.None);

                 DataCacheClientLogManager.ChangeLogLevel(System.Diagnostics.TraceLevel.Off);

              &NBSP ; DataCacheFactory _factory = new DataCacheFactory(configuration);

                DataCache _cache = _factory.GetCache(" default");


删除了1.1客户端并安装了1.0客户端,它又开始工作了。


寻找 建议! :)


谢谢


Roman Tumaykin


Roman

解决方案

盒子上安装了哪个版本的.NET?是.NET 4.5 Dev。预览?


Recently I decided to upgrade the dev appfabric caching cluster server and my local client to v 1.1. Reinstalled server on 2 fresh new VMs, opened all ports, set up security, figured out that an additional port on both servers needs to be opened (ICMPv4 8 - 0) to have cluster hosts communicate with each other.

When I removed the v 1.0 client and installed v 1.1 client on my workstation, I've started getting the following errors during the execution of this line:

cacheFactory.GetCache("default");

Type 'Microsoft.ApplicationServer.Caching.HostNodeDomainConfigurationElementCollection' is an invalid collection type since it does not have a valid Add method with parameter of type 'System.Object'

It turned out that if I set the target Framework to be 3.5 then all works fine, when 4.0 or above (I do run VS11 side by side on this workstation), it breaks.

                List<DataCacheServerEndpoint> servers = new List<DataCacheServerEndpoint>(1);
                servers.Add(new DataCacheServerEndpoint("dev-app-01", 22233));
                servers.Add(new DataCacheServerEndpoint("dev-app-02", 22233));
                DataCacheFactoryConfiguration configuration = new DataCacheFactoryConfiguration();
                configuration.Servers = servers;
                configuration.LocalCacheProperties = new DataCacheLocalCacheProperties();
                configuration.SecurityProperties = new DataCacheSecurity(DataCacheSecurityMode.None, DataCacheProtectionLevel.None);
                DataCacheClientLogManager.ChangeLogLevel(System.Diagnostics.TraceLevel.Off);
                DataCacheFactory _factory = new DataCacheFactory(configuration);
                DataCache _cache = _factory.GetCache("default");

Removed 1.1 client and installed 1.0 client and it started working again.

Seeking for advise ! :)

Thank you

Roman Tumaykin


Roman

解决方案

Which version of .NET is installed on the box ? Is it .NET 4.5 Dev. Preview ?


这篇关于Windows Server AppFabric 1.1在为.Net Framework 4.0或更高版本编译项目时缓存客户端异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆