【问题标题】:WebApplication unable to find assembly Microsoft.ServiceBus after first success第一次成功后,WebApplication 无法找到程序集 Microsoft.ServiceBus
【发布时间】:2015-02-09 16:20:28
【问题描述】:

我们在一个使用 Microsoft 的 ServiceBus 作为队列的 MVC Web 应用程序项目中。客户下订单,然后由后端系统处理,完成后通过服务总线将响应发送回 WebApp。

我们第一次触发此流程时一切正常。第二次执行流程时,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”版本=“2.4.8.0”。我也尝试过使用 2.6.0 版,结果相同。

新环境与旧环境的不同之处在于它是Windows 2012 server而不是2010,以及IIS 8而不是IIS 7。新环境的硬件资源处于优良水平。

【问题讨论】:

    标签: c# .net servicebus


    【解决方案1】:

    我们遇到了同样的问题并通过安装解决了它

    • HTTP 激活
    • TCP 激活

    .NET Framework 4.5 下的功能

    最好的问候, 弗兰克

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-07
      • 1970-01-01
      • 1970-01-01
      • 2015-01-03
      • 1970-01-01
      相关资源
      最近更新 更多