Asp.net mvc 用于Enyimmecached问题的protobuf网络转码器
protobuf net到enyim缓存的转码器是否已弃用 像这样设置Enyim config会在尝试启动MemcachedClient()时导致错误 使用时相同 transcoder type=“ProtoBuf.Caching.Enyim.NetTranscoder”/ 都是通过nuget安装的,并且都使用了最新的可用版本。是的(咳嗽),当然有!请看“protobuf net.Enyim”,即 PM>安装包protobuf-net.Enyim (或使用GUI客户端) 要初始化,您需要将转码器配置为ProtoBuf.Caching.Enyim.NetTranscoder的实例(按照原始说明)。如果通过配置执行此操作,请注意,此类型的程序集现在是Asp.net mvc 用于Enyimmecached问题的protobuf网络转码器,asp.net-mvc,protobuf-net,enyim.caching,Asp.net Mvc,Protobuf Net,Enyim.caching,protobuf net到enyim缓存的转码器是否已弃用 像这样设置Enyim config会在尝试启动MemcachedClient()时导致错误 使用时相同 transcoder type=“ProtoBuf.Caching.Enyim.NetTranscoder”/ 都是通过nuget安装的,并且都使用了最新的可用版本。是的(咳嗽),当然有!请看“protobuf net.Enyim”,即 PM>安装包protobuf-net.Enyim (或使用GUI客户端) 要初始化,您需要将转码器
protobuf net.Enyim
。如果我假设配置文件使用标准符号,那么这意味着您需要指定(在配置中):
原始答复: enyim转码器目前不在nuget中;然而,我现在将自己承担起复活的责任,通过添加一个单独的NuGet包(参考EnyimMemcached和protobuf net)将其添加回 随机问题。。。你能给我指一个二进制memcached下载进行测试吗
这方面落后的一个原因是,当我第一次编写enyim转码器时,memcached是一个简单的“运行这个”——但上次我看到它完全是“enterprisey”,我无法找到一个只有memcached服务器的简单包。如果你能告诉我它现在在哪里,我会在这个周末让它工作。这行吗?我发现的最新版本是1.4.5。如果需要的话,我很乐意帮忙。@TadeuMaia稍后会看-ta@marc我使用中的链接获取memcached 1.4.14 x64。对于那些关注原始博客文章并遇到问题的人,正确的配置设置是
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:
<transcoder type="ProtoBuf.Caching.Enyim.NetTranscoder,protobuf-net.Enyim" />