I've encountered a NullReferenceException that is not handled by the MVC global error event handler (Application_Error). This is only happening in production. The IIS application pool shuts down after five failures due to the Rapid-Fail Protection IIS settings. There's only one application in the pool.
Below is a snippet from a .wer (Windows Error Reporting) file. It contains information about the unhandled exception. My understanding is Sig[6] contains the important value. I used the value e3 (227 in decimal) to find the method signature in IL code.
EXE File name: Sig[0].Value=w3wp.exe
EXE File Assembly Version: Sig[1].Value=7.5.7601.17514
EXE File Stamp: Sig[2].Value=4ce7afa2
EXE File Full Assembly Version: Sig[3].Value=System.Web
Faulting Assembly Version: Sig[4].Value=4.7.3282.0
Faulting Assembly Timestamp: Sig[5].Value=5bd8e3e7
Faulting Assembly Method Def: Sig[6].Value=e3
Faulting Method IL Offset: Sig[7].Value=25
Exception Type: Sig[8].Value=System.NullReferenceException
The value of Sig[6] translates to the token 06000227. The instructions for translating from e3 to 06000227 can be found here.
.method /*06000227*/ private hidebysig newslot specialname virtual final
instance bool System.Web.HttpApplication.IExecutionStep.get_IsCancellable() cil managed
{
.override System.Web.HttpApplication/*0200003A*//IExecutionStep/*0200003F*/::get_IsCancellable /*0200003F::0600020B*/
// Code size 2 (0x2)
.maxstack 8
IL_0000: ldc.i4.0
IL_0001: ret
} // end of method MapHandlerExecutionStep::System.Web.HttpApplication.IExecutionStep.get_IsCancellable
Provided I did the translation correctly, why would IsCancellable throw/cause a NullReferenceException? Is there more for me to trace up the call stack? The fact that the error is coming from System.Web is confusing me.
Other event handlers used in the global.asax:
- Application_PreRequestHandlerExecute
- Application_BeginRequest
- Application_AuthenticateRequest
Please let me know if you need more details.
Thank you for your help.