开发者

Get URL of error page in global.asax's Application_OnError

开发者 https://www.devze.com 2022-12-17 07:46 出处:网络
I have an ASP.NET application where I am tracking my application level errors using Global.asax On_Error method. I will send an email to my id when there is some error happened in the site (i.e.: when

I have an ASP.NET application where I am tracking my application level errors using Global.asax On_Error method. I will send an email to my id when there is some error happened in the site (i.e.: when the Application_Error being 开发者_运维百科invoked). Now from my Global.asax's Application_OnError event, how can I get the URL of the page where this error was raised?


Use Request.Url


You can use:

HttpContext.Current.Request.Url


Will Request.RawUrl work?

0

精彩评论

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