“Microsoft.ApplicationServer.Caching.Provider”的类型初始值设定项引发了异常。 [英] The type initializer for 'Microsoft.ApplicationServer.Caching.Provider' threw an exception.

查看:69
本文介绍了“Microsoft.ApplicationServer.Caching.Provider”的类型初始值设定项引发了异常。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这个问题"'Microsoft.ApplicationServer.Caching.Provider'的类型初始化程序引发了异常。" AppFabric Beta 2安装在Win 2008 R2上没有任何问题。 
这是我的应用程序客户端的初始化代码:


DataCacheServerEndpoint [] servers = new DataCacheServerEndpoint [1];

servers [0] =

Hi,
I have got this problem "The type initializer for 'Microsoft.ApplicationServer.Caching.Provider' threw an exception." The AppFabric Beta 2 was installed on the Win 2008 R2 without any problems. 
Here is my initialization code for my application client:

DataCacheServerEndpoint[] servers = new DataCacheServerEndpoint[1];

servers[0] =

new DataCacheServerEndpoint " SERVERCACHE" ,22233);

 

new DataCacheServerEndpoint("SERVERCACHE", 22233);

 

DataCacheFactoryConfiguration factoryConfig = new < span style ="font-size:x-small"> DataCacheFactoryConfiguration ();

factoryConfig.Servers = servers;

DataCacheFactoryConfiguration factoryConfig = new DataCacheFactoryConfiguration();

factoryConfig.Servers = servers;

 

DataCacheFactory mycacheFactory = < span style ="color:#0000ff; font-size:x-small"> new DataCacheFactory (factoryConfig);

 

DataCacheFactory mycacheFactory = new DataCacheFactory(factoryConfig);

 

cache = mycacheFactory.GetDefaultCache();

这是我的配置文件:
<? xml 版本 = " 1.0 " ; 编码 = " utf-8 " ?>

<

cache = mycacheFactory.GetDefaultCache();

Here is my config file:
<?xml version="1.0" encoding="utf-8" ?>

<

 

配置 >

<! -

configuration>

<!--

 

configSections必须是第一个元素 - >

<

configSections must be the FIRST element -->

<

 

configSections >

<! -

configSections>

<!--

 

元素 - > ;

<

required to read the <dataCacheClient> element -->

<

 

section < span style ="color:#0000ff; font-size:x-small"> 名称 = " dataCacheClient "

 

 

type = " Microsoft.ApplicationServer.Caching.DataCacheClientSection,

Microsoft.ApplicationServer.Caching.Core,Version = 1.0.0.0,

type="Microsoft.ApplicationServer.Caching.DataCacheClientSection,

Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0,

Culture = neutral,PublicKeyToken = 31bf3856ad364e35

Culture=neutral, PublicKeyToken=31bf3856ad364e35

 

"

 

 

allowLocation = " true "

 

 

allowDefinition = " 无处不在 " />

< ; /

allowDefinition="Everywhere"/>

</

 

configSections >

<

configSections>

<

 

dataCacheClient >

<! -

dataCacheClient>

<!--

 

(可选)指定本地缓存 - >

<

(optional) specify local cache -->

<

 

localCache

 

 

isEnabled = " true "

 

 

sync = " TTLBased "

 

 

objectCount = " 100000 "

 

 

ttlValue = " 300 " />

<

ttlValue="300" />

<

<

 

主机

 

 

名称 <跨度style ="color:#0000ff; font-size:x-small"> = " SERVERCACHE "

 

 

cachePort = " 22233 " /> < font size = 2 color ="#0000ff">

< /

cachePort="22233"/>

</

 

主机 >

< /

hosts>

</

 

dataCacheClient >

< /

dataCacheClient>

</

 

配置 < span style ="color:#0000ff; font-size:x-small"> >
你有吗任何可能出现问题的想法?谢谢。

configuration>

Do you have any notion where the problem could be? Thanks.

推荐答案


<是否还可以发布异常的子状态,以便更好地调试问题。

有一个类似的帖子具有相同的上级 例外: http://social.msdn.microsoft.com/Forums/en-US/velocity/thread/6d3db435-d694-4ea5-a88a-415d19134d07 功能;.看看它是否对你有所帮助。

谢谢,
Harish Kumar Agarwal成员 - AppFabric Cache Team
Hi ,

Can you also post the sub-status of the exception so that it helps us in debugging the issue better .

There was a similar post with the same upper-level exception : http://social.msdn.microsoft.com/Forums/en-US/velocity/thread/6d3db435-d694-4ea5-a88a-415d19134d07 . Do take a look if it helps you here .

Thanks ,
Harish Kumar Agarwal
Member - AppFabric Cache Team


这篇关于“Microsoft.ApplicationServer.Caching.Provider”的类型初始值设定项引发了异常。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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