ずっと、Windows環境で開発してるんだけど、本番ではLinux上のmod-mono-server上で稼働させる予定です。なので、1回は試しとかないとまずいよねということで、デプロイしてみたら、Enyim Memcachedがコケました orz
スタックトレースは以下↓
System.TypeInitializationException: An exception was thrown by the type initializer for CreamonModel.Utility.MemCachedUtil ---> System.TypeInitializationException: An exception was thrown by the type initializer for Enyim.Caching.Memcached.ServerPool ---> System.NotImplementedException: The requested feature is not implemented.
at System.Configuration.ConfigurationElement.get_EvaluationContext () [0x00000]
at Enyim.Caching.Configuration.MemcachedClientSection.PostDeserialize () [0x00000]
at System.Configuration.ConfigurationElement.DeserializeElement (System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000]
at System.Configuration.ConfigurationSection.DeserializeSection (System.Xml.XmlReader reader) [0x00000]
at System.Configuration.Configuration.GetSectionInstance (System.Configuration.SectionInfo config, Boolean createDefaultInstance) [0x00000]
at System.Configuration.Configuration.GetSectionInstance (System.Configuration.SectionInfo config, Boolean createDefaultInstance) [0x00000]
at System.Configuration.Configuration.GetSectionInstance (System.Configuration.SectionInfo config, Boolean createDefaultInstance) [0x00000]
at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x00000]
at System.Configuration.Configuration.GetSection (System.String path) [0x00000]
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x00000]
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName) [0x00000]
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000]
at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000]
at Enyim.Caching.Memcached.ServerPool..cctor () [0x00000] --- End of inner exception stack trace ---
2行目を見ると、System.Configuration.ConfigurationElementクラスの、EvaluationContextプロパティをGetするところで落ちてるみたいなので、 最新の、Mono1.9.1のソースで該当箇所を確認すると・・・。
[MonoTODO]
protected ContextInformation EvaluationContext {
get {
throw new NotImplementedException ();
}
}
ちょっ Σ( ̄□  ̄||
なんか例外投げてました orz う~ん、Enyim Memcachedは、.NETのMemcachedClientで唯一ジェネリック対応メソッドがあって使いやすいのになぁ。 別のライブラリを使うか、Monoがちゃんと実装されるのを待つか。うーん困った。