【发布时间】:2011-04-08 19:34:56
【问题描述】:
首先让我说一下这个错误的奇怪之处在于应用程序正在运行,并且错误冒泡到事件日志中,但它是间歇性的。有时间隔2小时,有时几分钟,有时半小时。似乎没有直接与请求相关联(并且请求似乎并没有因此而失败,尽管现在几乎所有请求都应该命中 NHibernate)。
我已确保该 dll 位于 bin 中,它是畅通无阻的(如果其中任何一个都不是,我希望它总是会失败,而不仅仅是有时)。
对于应用程序,我使用的是 Nhibernate 2.1.2、castle activerecord 2、ASP.NET MVC 2,并且应用程序部署在 IIS 7.5 上,数据库使用 SQL Server 2005。我在 Stack 上看到了类似的错误,但那里没有答案,希望有人对此错误有所了解。
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)
【问题讨论】:
-
找不到哪个程序集?您能否提供堆栈跟踪或更详细的错误消息?
-
休眠。我添加了堆栈跟踪。
标签: asp.net nhibernate debugging iis exception