When running MassTransit in ASP.NET. A NullReferenceException
is being thrown, as per the issue reported here:
Google Discussion Group
Relevant Detail
Does anybody know how to gracefully catch the exception when the AppDomain reloads?
The stack trace only goes as far as the MassTransit DLL:
NullReferenceException in ThreadPoolConsumerPool
Locating source for 'd:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Threading\ThreadPoolConsumerPool.cs'. (No checksum.)
The file 'd:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Threading\ThreadPoolConsumerPool.cs' does not exist.
Looking in script documents for 'd:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Threading\ThreadPoolConsumerPool.cs'...
Looking in the projects for 'd:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Threading\ThreadPoolConsumerPool.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: d:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Threading\ThreadPoolConsumerPool.cs.
The debugger could not locate the source file 'd:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Threading\ThreadPoolConsumerPool.cs'.
You should be able to catch any uncaught exception in global.asax: http://msdn.microsoft.com/en-us/library/24395wz3(v=vs.100).aspx
Implement the error handler:
void Application_Error(object sender, EventArgs e)
and mark the exception as handled:
Server.ClearError();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With