ASP.NET应用程序投掷"无法找到组装"错误的NHibernate [英] ASP.NET application throwing "unable to find assembly" error for NHibernate

查看:163
本文介绍了ASP.NET应用程序投掷"无法找到组装"错误的NHibernate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,让我说,这个错误奇怪的是,该应用程序正在运行,并且错误泡到事件日志开始,但它是间歇性的。有时,它有时半个小时IT之间2小时发生,有时几分钟。似乎没有直接连接到请求(请求似乎并没有因为它要失败的,虽然几乎所有的请求应打NHibernate的现在)。

我保证该dll是在垃圾桶,它的畅通(如果不是那些情况并非如此,我希望它总是失败,不只是有时)。

有关应用程序,我使用NHibernate 2.1.2,城堡的ActiveRecord 2,ASP.NET MVC 2,和应用程序与该数据库SQL Server 2005的部署在IIS 7.5。我看到堆栈,但没有答案,有一个类似的错误,希望有人对这个错误的见解。

 消息:无法找到程序集​​NHibernate的,版本= 2.1.2.4000,文化=中立,
公钥= aa95f207798dfdb4。堆栈跟踪:在
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()

System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo
程序集信息,字符串名称)在System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(字符串对象名,
的String [] memberNames,BinaryTypeEnum [] binaryTypeEnumA,对象[] typeInformationA,
INT32 [] memberAssemIds,ObjectReader objectReader,INT32 OBJECTID,BinaryAssemblyInfo
程序集信息,SizedArray assemIdToAssemblyTable)

 System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped记录)
在System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
在System.Runtime.Serialization.Formatters.Binary .__ BinaryParser.Run()
在System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler处理器,__BinaryParser serParser,布尔FCHECK,布尔isCrossAppDomain,IMet​​hodCallMessage methodCallMessage)
在System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(流serializationStream,HeaderHandler处理器,布尔FCHECK,布尔isCrossAppDomain,IMet​​hodCallMessage methodCallMessage)
在System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream的STM)
在System.AppDomain.Deserialize(字节[] BLOB)
在System.AppDomain.UnmarshalObject(字节[] BLOB)


解决方案

这是否也发生在应用程序启动时或者是它总是在未来一段时间内该应用程序启动后?

检查<一href=\"http://stackoverflow.com/questions/1799376/unhandled-iis-exception-how-can-i-track-it-down\">http://stackoverflow.com/questions/1799376/unhandled-iis-exception-how-can-i-track-it-down (其中有一个非常类似的堆栈跟踪),这导致的http://unhandledexception.$c$cplex.com/SourceControl/changeset/view/55373#118549

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)

解决方案

does this also happen on Application start up or is it always at some time in the future after the application has started?

Check http://stackoverflow.com/questions/1799376/unhandled-iis-exception-how-can-i-track-it-down (which has a very similar stack trace) which leads to http://unhandledexception.codeplex.com/SourceControl/changeset/view/55373#118549

这篇关于ASP.NET应用程序投掷&QUOT;无法找到组装&QUOT;错误的NHibernate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆