I have a WCF service that has the following code in Global.asax:
protected void Application_Start(object sender, EventArgs e) {
The idea is to at least log all unused exceptions.
But he seems to never be called. I tried to make Divide by Zero in one of my office operations, and it just stops the service after it gets into the exception.
int zero = 0; int result = 100 / zero;
The LogUnhandledException method is never called.
I tried this in both IIS and worked in a debugger.
How can I make this event work for the WCF service?
source share