Search code examples
c#exceptioniisiis-7httpmodule

IIS Exception logger for every app within


I have used Elmah ,log4net and nlog for logging exceptions.

I m curious how I can catch exceptions for any applications of websites that runs under same IIS.

Do i need to develop and IIS Module and bind it?

Not sure, how can i catch exceptions that happens in any apps within IIS?

I m interested in intercepting the exceptions and such to log myself.


Solution

  • I have never tried but whats stopping you from adding elmah to machine config?

    This solution should suitable for you check it http://www.christiaanverwijs.nl/post/2012/06/27/NET-HttpModule-to-log-all-unhandled-exceptions-in-IIS-75-through-Log4NET-(globally-or-per-site).aspx