将 NServiceBus 升级到版本 3.3.8 后出现 WebException 错误 404 [英] WebException error 404 after upgrading NServiceBus to version 3.3.8

查看:97
本文介绍了将 NServiceBus 升级到版本 3.3.8 后出现 WebException 错误 404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I just updated my NServiceBus solution to version 3.3.8. My previous version was 3.2.2.

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

When I run my solution, I receive the following error:

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

WebException Occurred The remote server returned an error: (404) Not Found.

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

System.Net.WebException occurred HResult=-2146233079 Message=The remote server returned an error: (404) Not Found. Source=System StackTrace: at System.Net.HttpWebRequest.GetResponse() at Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func`1 getResponse) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 279 InnerException:

来自 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".

From Visual Studio: Locating source for 'c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs'. (No checksum.) The file 'c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs' does not exist. Looking in script documents for 'c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs'... Looking in the projects for 'c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs'. The file was not found in a project. Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'... Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'... Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'... Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'... The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs. The debugger could not locate the source file 'c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\ReplicationInformer.cs'.

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

I have tried updating to build 992 for RavenDB. (Stopped RavenDB, and replaced binaries for the exe) I removed RavenDB completely, and used NServiceBus.Host.exe /InstallInfrastructure in an attempt to reinstall RavenDB.
This failed to resolve the issue.

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

I have also read that this is a typical WebException for NServiceBus version 3.3.x? Do I need to suppress the exception for Visual Studio debugging?

这是我的总线配置:

        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:

Here is my 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 版.

Do I need to manually configure NServiceBus to connect to RavenDB? If so, how? My solution worked great with NServiceBus version 3.2.2.

推荐答案

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

Try to disable break on all exceptions.

这篇关于将 NServiceBus 升级到版本 3.3.8 后出现 WebException 错误 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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