protobuf网跨codeR为EnyimMemcached问题 [英] protobuf-net transcoder for EnyimMemcached problems

查看:224
本文介绍了protobuf网跨codeR为EnyimMemcached问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从protobuf网跨codeR到enyim缓存德precated? 分布式缓存与protobuff网

设置我的Enyim的配置就这样的的app.config 导致一个错误,当我尝试启动MemcachedClient()
同样用


  

跨codeR TYPE =ProtoBuf.Caching.Enyim.NetTrans codeR/


  System.TypeInitializationException是由用户code未处理
的HResult = -2146233036
消息=为'Enyim.Caching.MemcachedClient'的类型初始值引发了异常。
来源= Enyim.Caching
类型名= Enyim.Caching.MemcachedClient
堆栈跟踪:
   在Enyim.Caching.MemcachedClient..ctor()
   在Global.asax.cs中:第31行
的InnerException:System.Configuration.ConfigurationErrorsException
   的HResult = -2146232062
   消息=属性'跨codeR'的价值不能被解析。错误是:对象引用未设置到对象的实例。 (\\ web.config行207)
   来源= System.Configuration
   BareMessage =属性'跨codeR'的价值不能被解析。错误是:对象引用未设置到对象的实例。
   堆栈跟踪:
        在System.Configuration.BaseConfigurationRecord.EvaluateOne(字符串[]键,输入SectionInput,布尔isTrusted,FactoryRecord factoryRecord,SectionRecord sectionRecord,对象parentResult)
        在System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord,SectionRecord sectionRecord,对象parentResult,布尔getLkg,布尔getRuntimeObject,对象和放大器;因此,对象和放大器; resultRuntimeObject)
        在System.Configuration.BaseConfigurationRecord.GetSectionRecursive(字符串configKey,布尔getLkg,布尔的checkPermission,布尔getRuntimeObject,布尔requestIsHere,对象和放大器;因此,对象和放大器; resultRuntimeObject)
        在System.Configuration.BaseConfigurationRecord.GetSection(字符串configKey)
        在System.Web.HttpContext.GetSection(字符串sectionName)
        在System.Web.Configuration.HttpConfigurationSystem.GetSection(字符串sectionName)
        在System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
        在System.Configuration.ConfigurationManager.GetSection(字符串sectionName)
        在Enyim.Caching.MemcachedClient..cctor()在MemcachedClient.cs:第25行
   的InnerException:

既可以通过的NuGet,并使用可用的最新版本安装。


解决方案

是(咳嗽),当然这是有!只看到的protobuf-net.Enyim,即。


  

PM>安装封装的protobuf-net.Enyim


(或使用GUI客户端)

要初始化,您需要配置跨codeR为 ProtoBuf.Caching.Enyim.NetTrans codeR 的一个实例(根据原说明)。如果您是通过配置这样做,请注意,这种类型的程序集现在是的protobuf-net.Enyim 。如果我假设配置文件使用标准的符号,那么这意味着你需要指定(在配置):

 <跨codeR TYPE =ProtoBuf.Caching.Enyim.NetTrans codeR,protobuf的-net.Enyim/>


原来的答复:

该enyim跨codeR为目前的NuGet;然而 - 我会的现在的承担起自己的复活,加入,增加了这回在一个单独的NuGet包(参考EnyimMemcached和protobuf网)

随机的问题...你可以在一个二进制的memcached的下载测试指向我任何机会?

本已落后的一个原因是,当我的第一个的写了enyim跨codeR,memcached的是一个简单的运行此 - 但我最后一次看它已经走了所有enterprisey ,我不能追查一个简单的包,刚把memcached服务器。如果你能告诉我在哪里的的是现在,我会得到它的工作本周末。

Is the transcoder from protobuf-net to enyim cache deprecated? distributed caching with protobuff-net

Setting my Enyim config just like this app.config causes an error when I try to start the MemcachedClient() The same for using

transcoder type="ProtoBuf.Caching.Enyim.NetTranscoder"/

System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'Enyim.Caching.MemcachedClient' threw an exception.
Source=Enyim.Caching
TypeName=Enyim.Caching.MemcachedClient
StackTrace:
   at Enyim.Caching.MemcachedClient..ctor()
   at Global.asax.cs:line 31
InnerException: System.Configuration.ConfigurationErrorsException
   HResult=-2146232062
   Message=The value of the property 'transcoder' cannot be parsed. The error is: Object reference   not set to an instance of an object. (\web.config line 207)
   Source=System.Configuration
   BareMessage=The value of the property 'transcoder' cannot be parsed. The error is: Object reference not set to an instance of an object.
   StackTrace:
        at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
        at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
        at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
        at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
        at System.Web.HttpContext.GetSection(String sectionName)
        at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
        at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
        at System.Configuration.ConfigurationManager.GetSection(String sectionName)
        at Enyim.Caching.MemcachedClient..cctor() in MemcachedClient.cs:line 25
   InnerException: 

Both installed via nuget and using the latest version available.

解决方案

Yes (cough), of course that's there! Just see "protobuf-net.Enyim", i.e.

PM> Install-Package protobuf-net.Enyim

(or use the GUI client)

To initialize, you need to configure the transcoder to be an instance of ProtoBuf.Caching.Enyim.NetTranscoder (as per the original instructions). If you are doing this via configuration, note that the assembly for this type is now protobuf-net.Enyim. If I assume the configuration file uses standard notation, then that means you would need to specify (in the config):

<transcoder type="ProtoBuf.Caching.Enyim.NetTranscoder,protobuf-net.Enyim" />


Original answer:

The enyim transcoder is not currently in nuget; however - I will right now take it upon myself to resurrect that, by adding a separate NuGet package (reference EnyimMemcached and protobuf-net) that adds this back in.

Random question... any chance you can point me at a binary memcached download for testing?

One reason this has lagged is that when I first wrote the enyim transcoder, memcached was a simple "run this" - but last time I looked it had gone all "enterprisey", and I couldn't track down a simple package that just had the memcached server. If you can show me where that is now, I'll get it working this weekend.

这篇关于protobuf网跨codeR为EnyimMemcached问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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