How to properly capture web app errors in Global.asax
In the Application_Error event, I get the last error via:
Exception lastError = Context.Server.GetLastError();
which always yields the same error: Exception of type 'System.Web.HttpUnhandle开发者_StackOverflowdException' was thrown.
How do I get to the actual error that occurred?
Exception objErr = Server.GetLastError().GetBaseException();
Also read this complete refernece: How to create custom error reporting pages in ASP.NET by using Visual C# .NET
精彩评论