第三次尝试后发送NServiceBus消息

时间:2013-04-30 19:44:19

标签: nservicebus

我第一次使用NServiceBus。

我有一个MVC WebApp和一个服务器(dll)。我的问题:我的服务器没有收到发送的消息。或者,我的消息没有发送。我在发送消息时在输出窗口中收到此消息:

A first chance exception of type 'System.Web.HttpException' occurred in System.Web.Mvc.dll
A first chance exception of type 'System.Web.HttpException' occurred in System.Web.dll
A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll
A first chance exception of type 'System.Messaging.MessageQueueException' occurred in System.Messaging.dll
A first chance exception of type 'System.Net.WebException' occurred in System.dll
A first chance exception of type 'System.Net.WebException' occurred in NServiceBus.Core.dll
A first chance exception of type 'System.Net.WebException' occurred in NServiceBus.Core.dll
A first chance exception of type 'System.Net.WebException' occurred in System.dll
A first chance exception of type 'System.Net.WebException' occurred in NServiceBus.Core.dll
A first chance exception of type 'System.Net.WebException' occurred in NServiceBus.Core.dll
A first chance exception of type 'System.Messaging.MessageQueueException' occurred in System.Messaging.dll
A first chance exception of type 'System.Messaging.MessageQueueException' occurred in System.Messaging.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.Messaging.MessageQueueException' occurred in System.Messaging.dll
A first chance exception of type 'System.Messaging.MessageQueueException' occurred in System.Messaging.dll
x times -> A first chance exception of type 'System.Messaging.MessageQueueException' occurred in System.Messaging.dll

奇怪的是:当我连续3次调用我的MVC控制器(立即按F5 3次)时,会在服务器上发送和接收一条消息!!!

我的global.asax.cs

    Configure.With()
        .DefaultBuilder()
        .ForMvc()
        .JsonSerializer()
        .Log4Net()
        .MsmqTransport()
            .IsTransactional(false)
            .PurgeOnStartup(true)
        .UnicastBus()
            .ImpersonateSender(false)
        .CreateBus()
        .Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());

服务器:

 Configure.With()
       .DefaultBuilder()
     .JsonSerializer();

我做错了什么????

0 个答案:

没有答案