I'm using the NES sample which works out of the box. Then I have swapped the NServiceBus 2.5 version with an older 2.0 but this results in the following error when starting the MVC application:
"Object reference not set to an instance of an object."
at NES.EventConverterFactory..ctor()
at NES.DI.<.cctor>b_6() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DI.cs:line 24
at NES.DependencyInjectionContainer.ResolveTService in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20
at NES.DependencyInjectionContainer.<>c_DisplayClass42.<Register>b__3() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 45
at NES.DependencyInjectionContainer.Resolve[TService]() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20
at NES.DependencyInjectionContainer.<>c__DisplayClassa
4.b_9() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 59
at NES.DependencyInjectionContainer.ResolveTService in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20
at NES.DependencyInjectionContainer.<>c_DisplayClass4`2.b__3() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 45
at NES.DependencyInjectionContainer.ResolveTService in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20
at NES.UnitOfWorkFactory.Begin() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\UnitOfWorkFactory.cs:line 18
at NES.NServiceBus.MessageModule.HandleBeginMessage() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\NServiceBus\MessageModule.cs:line 10
at NServiceBus.Unicast.UnicastBus.TransportStartedMessageProcessing(Object sender, EventArgs e)
at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.ReceiveFromQueue()
at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.Proc开发者_如何学JAVAess()
Now this happens when the Global.asax.cs hits "AreaRegistration.RegisterAllAreas();". In the end, the error occurs in "EventConverterFactory.cs" line 13 where the static constructor tries to iterate "Global.TypesToScan" which is null.
Does anyone know how to get this sample going? It is odd that the exact same code seem to work with NSB 2.5 assemblies...
Werner
It looks as if a message is being handled in an endpoint that hasn't been initialised with the .NES() extension.
精彩评论