Perhaps I'm missing something here and this question is maybe the same as this one so sorry for any duplication.
I have an MVC4 site that quite happily Sends() commands to my NServiceBus server. I now want the same MVC site to be able to subscribe to IEvents Publish()ed from the same NServiceBus server. But I just can't get it to work.
Messages are being published from the server and are showing in MSMQ but I can't get the MVC site to pick them up.
Is this possible with NServiceBus 3.3.5? And if so, how do I have to set up my MVC site to make it work?
Thanks in advance!
Edit: Here's the config I have in the MVC app:
Configure.With()
.Log4Net()
.StructureMapBuilder()
.MsmqTransport()
.IsTransactional(false)
.PurgeOnStartup(false)
.UnicastBus()
.LoadMessageHandlers()
.ImpersonateSender(false)
.JsonSerializer()
.CreateBus()
.Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());
I don't have an EndpointConfig class that implements the IConfigureThisEndpoint or and AsA_ interfaces. I've tried adding one but it never gets called and I can't work out what the host would be or how to start the NServiceBus host application from the web app. Or even what context the host would run under if the code sits inside IIS (if that makes sense!).