I’m trying to figure out a way to trap all exceptions on a site and store them and well the problem is i don’t want to go and try catch everything.
I already figured out the resolve to a custom error page and I’m doing that, but i would like as a administrator to know when a user encountered an error, and what error. And i know there must be a way to globally get all exceptions and store them.
I have been looking for a solution or at least something pointing in the right way for days, but all I’m finding is clumsy ways of doing it.
So my question is. Is there a one stop shop kind of thing for this? Can i catch the exception and do the storing procedure in one place without adding something to every class in my solution? In that case where do i run my storing procedure?
Add Global.asax file to your asp.net project and handle application error:
And here is LoggerManager part: