0
我們正在使用Microsofts ServiceBus作爲隊列的MVC Web應用程序項目中。客戶下訂單後由後端系統處理,完成後通過服務總線將響應發送回WebApp。WebApplication在第一次成功後無法找到程序集Microsoft.ServiceBus
我們第一次觸發這個流程一切正常。流程執行WebApplication的第二次有以下錯誤:
Application ID: DefaultDomain
Process ID: 3504
Exception: System.Runtime.Serialization.SerializationException
Message: Unable to find assembly 'Microsoft.ServiceBus, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
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.ObjectMap.Create(String name, 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.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)
如果我們重新啓動應用程序池和站點,一切都回到原點。它第一次運作,但隨後失敗。我們只在我們即將發佈的新的現場環境中有這種行爲。一切工作在當地和我們目前的生活環境。所以這必須關乎環境。我們現場有我們的環境,只有ServiceBus在Azure中。
ServiceBus:「WindowsAzure.ServiceBus」version =「2.4.8.0」。我也嘗試過2.6.0版,結果相同。
新環境與舊環境有所不同的一點是它是Windows 2012服務器而不是2010,以及IIS 8而不是IIS 7。新環境中的硬件資源處於良好水平。