【问题标题】:WebException error 404 after upgrading NServiceBus to version 3.3.8将 NServiceBus 升级到版本 3.3.8 后出现 WebException 错误 404
【发布时间】:2013-11-13 23:27:04
【问题描述】:

我刚刚将我的 NServiceBus 解决方案更新到版本 3.3.8。我之前的版本是 3.2.2。

当我运行我的解决方案时,我收到以下错误:

发生WebException 远程服务器返回错误:(404) Not Found。

发生 System.Net.WebException H结果=-2146233079 Message=远程服务器返回错误:(404) 未找到。 源=系统 堆栈跟踪: 在 System.Net.HttpWebRequest.GetResponse() 在 Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func`1 getResponse) 中 c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:279 行 内部异常:

来自 Visual Studio: 查找“c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs”的源。 (没有校验和。) 文件 'c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs' 不存在。 在脚本文档中查找 'c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs'... 查看“c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs”的项目。 在项目中找不到该文件。 查看目录'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'... 查看目录 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'... 查看目录'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'... 查看目录 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'... 活动解决方案的调试源文件设置表明调试器不会要求用户查找文件: c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs。 调试器找不到源文件 'c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs'。

我已尝试更新为 RavenDB 构建 992。 (停止 RavenDB,并替换了 exe 的二进制文件) 我完全删除了 RavenDB,并使用 NServiceBus.Host.exe /InstallInfrastructure 尝试重新安装 RavenDB。
这未能解决问题。

我还读到这是 NServiceBus 版本 3.3.x 的典型 WebException?我是否需要抑制 Visual Studio 调试的异常?

这是我的总线配置:

        Bus = NServiceBus.Configure.With()
            .DefineEndpointName("Orders")
            .Log4Net()
            .DefaultBuilder()
            .XmlSerializer()
            .MsmqTransport()
                .IsTransactional(false)
                .PurgeOnStartup(false)
            .UnicastBus()
                .LoadMessageHandlers()
                .ImpersonateSender(false)
            .CreateBus()
            .Start();

这是我的端点配置:

  public class EndpointConfig : IConfigureThisEndpoint, AsA_Server
  {
  }

这是我的 app.config:

 <configuration>
 <configSections>
   <section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig,  NServiceBus.Core" />
   <section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" />
   <section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
 </configSections>
 <MsmqTransportConfig ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" />
 <UnicastBusConfig ForwardReceivedMessagesTo="">
   <MessageEndpointMappings>
     <add Messages="InternalMessages" Endpoint="Manager" />
   </MessageEndpointMappings>
 </UnicastBusConfig>
 <MessageForwardingInCaseOfFaultConfig ErrorQueue="error" />
 </configuration>

是否需要手动配置 NServiceBus 才能连接到 RavenDB?如果是这样,怎么做?我的解决方案适用于 NServiceBus 3.2.2 版。

【问题讨论】:

    标签: c# nservicebus


    【解决方案1】:

    尝试禁用所有异常的中断。

    【讨论】:

    • 我在 Visual Studio 中禁用了 System.Net.WebException。 (调试 - 异常 - CLR 异常 - System.net.WebException)这禁用了异常中断。谢谢你的帮助。我的应用程序在调试模式下运行良好。我想知道是什么导致了异常。在这种情况下,NServiceBus 正在调用 RavenDB。为什么?可以通过 NServiceBus 配置来阻止调用吗?
    • 你看到的异常是因为 RavenDB 默认开启了复制,见stackoverflow.com/questions/5869700/…
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-05
    • 1970-01-01
    • 1970-01-01
    • 2021-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多