Behind the scenes in ASP.NET applications how is the method Application_Error being called when an Exception occurs? Reflection? Delegate? I went looking for the code using a decompiler and did not easily see where this happens.
I know how the events are wired up in WinForms when the methods get inserted with underscores. But got curious how this works in ASP.NET and what design pattern is being used.
You can refer to the msdn source for this https://msdn.microsoft.com/en-us/library/ms178473(v=vs.140).aspx
Application_Error can be raised at any phase in the application life cycle.