How to get which page threw an exception to Application_error in aspx

浪子不回头ぞ 提交于 2019-11-28 10:48:33
HttpContext con = HttpContext.Current;
con.Request.Url.ToString()

Remember, the page is not (should not) always be the cause of the exception. It could just as easily be coming from another assembly - and if you don't have your logic in your codebehinds, it likely will be coming from another assembly. Don't get me wrong, it is great to know which page, from the aspect of saying X Page caused Y exception in Z assembly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!