So let me start by saying that the weird thing about this error is that the application is running, and the error bubbles to the event log, but it's intermittent. Sometimes it's 2 hours between it happening, sometimes a few minutes, sometimes half an hour. Does not appear to be tied directly to requests (and requests don't seem to be failing because of it, though nearly all requests should be hitting NHibernate right now).
I've ensured that the dll is in the bin, it's unblocked (and if either of those weren't the case, I would expect it to fail always, not just sometimes).
For the app, I'm using Nhibernate 2.1.2, castle activerecord 2, ASP.NET MVC 2, and the app is deployed on IIS 7.5 with SQL Server 2005 for the db. I saw a similar error on Stack but no answers there, hoping someone has insight on this error.
Message: Unable to find assembly 'NHibernate, Version=2.1.2.4000, Culture=neutral,
PublicKeyToken=aa95f207798dfdb4'.
StackTrace: at
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo
assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName,
String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA,
Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo
assemblyInfo, SizedArray assemIdToAssemblyTable)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
at System.AppDomain.Deserialize(Byte[] blob)
at System.AppDomain.UnmarshalObject(Byte[] blob)