NES(.NET 事件源)示例异常(使用 NServiceBus 2.0)
我正在使用开箱即用的NES样品。然后,我将NServiceBus 2.5版本与较旧的2.0交换,但是在启动MVC应用程序时,这会导致以下错误:
“对象引用未设置为对象的实例。” 在nes.eventConverterFactory..ctor() 在c:\ users \ users \ werner \ downloads \ elliotritchie-nes-9a56ad8 \ eliotritchie-nes-9a56ad88 \ src \ src \ src \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ nes \ di.cs: 在c:\ users \ werner \ downloads \ elliotritchie-nes-9a56ad8 \ elliotritchie-nes-9a56Ad8 \ src \ src \ nes \ nes \ nes \ nes depentenceIntycontener.cs:linepoctionContainer.cs:lineptioncontener.cs: 在nes。 \ nes \ depentencyindoctionContainer.cs:第45行 at NES.DependencyInjectionContainer.Resolve[TService]() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20 在c:\ users \ werner \ downloads \ elliotritchie-nes-nes-nes-nes-9a56ad8 \ eliotritchie-nes-nes-nes-9a56ad88 \ srcointioncointioncontion。 .CS:第59行 在c:\ users \ werner \ downloads \ elliotritchie-nes-9a56ad8 \ elliotritchie-nes-9a56Ad8 \ src \ src \ nes \ nes \ nes \ nes depentenceIntycontener.cs:linepoctionContainer.cs:lineptioncontener.cs: 在c:\ users \ werner \ downloads \ users \ werner \下载\ elliotritchie-nes-nes-nes-nes-nes-nes-nes-nes-nes-nes-nes-9a56ad88 \ srcointer.inesinectienctienctienctiencontainer。 :第45行 在c:\ users \ werner \ downloads \ elliotritchie-nes-9a56ad8 \ elliotritchie-nes-9a56Ad8 \ src \ src \ nes \ nes \ nes \ nes depentenceIntycontener.cs:linepoctionContainer.cs:lineptioncontener.cs: 在C:\ Users \ Werner \ downloads \ Elliotritchie-nes-9a56ad8 \ Elliotritchie-nes-9A56AD8 \ src \ src \ nes \ nesofworkfactory.cs:18 liteftactory.cs:18 line 18 s in c:\ users \ users \ werner \ downloads \ users \ werner \ werner \ ines nes.unitofworkfactory.begin() 在c:\ users \ users \ werner \下载\ elliotritchie-nes-9a56ad8 \ elliotritchie-nes-9a56ad88 \ src \ src \ src \ nes \ neservicebus \ nserviceBus \ nservicebus \ sagageModule.scssagemodule.scssmodule.scs: 在nservicebus.unicast.unicastbus.transportstartedmessageprocessing(对象发送者,EventArgs e) 在nservicebus.unicast.transport.msmq.msmqtransport.receivefromqueue() 在nservicebus.unicast.transport.msmq.msmqtransport.process()
现在发生这种情况时,当global.asax.cs命中“ arearegistration.registerallareas();”。最后,误差发生在“ eventConverterFactory.cs”第13行中,其中静态构造函数尝试迭代“ global.typestoscan”为null。
有人知道如何使该样本进行吗?奇怪的是,完全相同的代码似乎与NSB 2.5组件一起使用...
Werner
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
4.b_9() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 59
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
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.Process()
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来好像一条消息正在尚未使用 .NES() 扩展名初始化的端点中处理。
It looks as if a message is being handled in an endpoint that hasn't been initialised with the .NES() extension.