1

我第一次使用 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();

我做错了什么???

4

0 回答 0