We have recently been upgrading NServiceBus on an older legacy web application. We are moving from 2.x all the way to 7, so it has been challenging at times updating the endpoints. We have since begun working on our web projects inside of the solution and are a bit confused on how exactly we are supposed to set up NServiceBus on a web project for .NET Framework? We are on version 4.7.2 and cannot find any documentation surrounding .NET Framework and Web Applications. All of the documentation and samples are for .NETCORE. We know the older way is to have the following section added in the Application_Startup() in the Global.asax.cs file:
NServiceBus.Configure.WithWeb()
.Log4Net()
.Autofac2Builder(this.Container)
.XmlSerializer()
.MsmqTransport()
.IsTransactional(true)
.PurgeOnStartup(false)
.UnicastBus()
.ImpersonateSender(true)
.LoadMessageHandlers()
.CreateBus()
.Start();
I’ve been searching for something to help point us in the right direction on how we can host NServiceBus via Web Application hosting, but for a .NET Framework MVC application.