因此,让我先说说这个错误的奇怪之处在于应用程序正在运行,并且错误冒泡到事件日志,但是它是间歇性的。有时候它会在两个小时之间发生,有时会持续几分钟,有时会持续半小时。似乎没有直接绑定到请求(并且请求似乎没有因此而失败,尽管几乎所有的请求都应该立即到达NHibernate)。我已经确保dll在bin中,它是畅通无阻的(如果其中任何一个不是这种情况,我会期望它总是失败,而不仅仅是有时)。ASP.NET应用程序为NHibernate抛出“无法找到程序集”错误
对于应用程序,我使用Nhibernate 2.1.2,castle activerecord 2,ASP.NET MVC 2,并且该应用程序部署在SQL Server 2005 for SQL Server 2005的IIS 7.5上。我在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)
无法找到哪个组件?你能提供堆栈跟踪还是更详细的错误信息? – 2010-09-06 14:51:24
Nhibernate。我添加了堆栈跟踪。 – Paul 2010-09-07 02:24:54