At the moment I use EVENT VIEWER in Administrative Tool to see some nested Asp Errors details for some pages of my website locally.
At the moment I deploying my website on the Server where I have access only to IIS 7.5 and its Logs.
I would like to know if is possible see errors for my ASP.NET directly in IIS or in some other way. Unfortunately using my website I’m not able to see the details for my errors.
Thanks.
we are using something like this in a small ASP.NET application we have:
this is using a very defensive approach checking also for context null, current user null and so on. the IEMLogger is our wrapper to LogçNet so we do not have dependencies of LogçNet spread all around…
Edit: please notice that this Application_Error event handler in Global.asax is the last resort of exception handler you should have, this catches all unhandled exceptions but does NOT replace the try/catch blocks you should have anyway in your application classes. Have those try catch as needed in the code of your application and use the same approach with a logger class which logs the exceptions at the very places where exceptions are thrown… this depends on your overall approach to exception and error handling, then if you go for Log4Net, NLog or other loggers everything is really a detail…