I get the following exception when I call CacheFactory.GetCache()
The actual inner exception is
I am not sure why I am getting an nhibernate error. I am using nhibernate in this project, although I am not sure why it causes scaleout to not load.
I tried the sample project, and that works fine. I tried adding nhibernate to the sample project, and it still works.
Code:
System.TypeInitializationException was caught
HResult=-2146233036
Message=The type initializer for '<Module>' threw an exception.
Source=soss_namedcache
TypeName=<Module>
StackTrace:
at Soss.Client.CacheFactory.GetCache()
at ScaleoutCacheProvider.ClearAll(String bankUri, Nullable`1 userIdentifier) in c:\src\FORB\Common\ScaleoutCacheProvider.cs:line 240
InnerException: <CrtImplementationDetails>.ModuleLoadException
HResult=-2146233088
Message=The C++ module failed to load while attempting to initialize the default appdomain.
Source=soss_svcdotnet
StackTrace:
at <CrtImplementationDetails>.ThrowModuleLoadException(String errorMessage, Exception innerException)
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
at .cctor()
InnerException: System.InvalidOperationException
HResult=-2146233079
Message=Cannot serialize a Session while connected
Source=mscorlib
StackTrace:
Server stack trace:
at NHibernate.Impl.SessionImpl.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeMessageParts(ArrayList argsToSerialize)
at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage..ctor(IMethodCallMessage mcm)
at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.SmuggleIfPossible(IMessage msg)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(IMessage reqMsg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.AppDomain.get_Id()
at <CrtImplementationDetails>.DoCallBackInDefaultDomain(IntPtr function, Void* cookie)
at <CrtImplementationDetails>.DefaultDomain.Initialize()
at <CrtImplementationDetails>.LanguageSupport.InitializeDefaultAppDomain(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
InnerException:
Code:
System.InvalidOperationException: Cannot serialize a Session while connected
I tried the sample project, and that works fine. I tried adding nhibernate to the sample project, and it still works.