NServiceBus throws The remote server returned an error: (404) Not Found

核能气质少年 提交于 2019-12-20 04:53:09

问题


I use simple a configuration to run a Publish/Subscribe scenario using NServiceBus.

I'm getting this exception:

The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.GetResponse()
   at Raven.Client.Connection.HttpJsonRequest.ReadJsonInternal(Func`1 getResponse) in
   c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 332

It's not a fatal one, it's handled somewhere in NServiceBus/RavenDb code, but I wonder why it's happening. I see it only when I select "Thrown" option for "Common Language Runtime Exceptions" in Exceptions window.


回答1:


I would recommend adding Log4Net (easiest is through the Visual Studio Package manager), and then telling NServiceBus that it should use log4net when configuring the Bus:

Bus = Configure.With()
    .Log4Net()
    .DefaultBuilder() //...

You'll find that NServiceBus logs plenty (either to the Console window of the NServiceBus host, or to the Visual Studio debugger window), and it's very likely to contain the reason why that 404 occurs.



来源:https://stackoverflow.com/questions/20676908/nservicebus-throws-the-remote-server-returned-an-error-404-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!