简体   繁体   English

Application_Error中的ASP.net Global.asax错误详细信息

[英]ASP.net Global.asax error detail in Application_Error

I need to get detailed Error in Application_Error of Global.asax. 我需要在Global.asax的Application_Error中获取详细的错误。

I use Server.GetLastError().Message , but it returns Exception of type 'System.Web.HttpUnhandledException' was thrown. 我使用Server.GetLastError().Message ,但是它返回Exception of type 'System.Web.HttpUnhandledException' was thrown.

I need more detail, how can I do that? 我需要更多细节,该怎么办? in asp.net C# 在asp.net C#中

Are you searching for Server.GetLastError().StackTrace ? 您在搜索Server.GetLastError()。StackTrace吗? If not, please explain what do you want to be shown? 如果没有,请说明您要显示什么?

Got it. 得到它了。 I was looking for Server.GetLastError().InnerException . 我在寻找Server.GetLastError().InnerException It returns fully detailed Error message. 它返回完全详细的错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM