开发者

How to properly capture web app errors in Global.asax

开发者 https://www.devze.com 2023-03-31 02:54 出处:网络
In the Application_Error event, I get the last error via: Exception lastError = Context.Server.GetLastError();

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

0

精彩评论

暂无评论...
验证码 换一张
取 消