How to prevent “aspxerrorpath” being passed as a query string to ASP.NET custom error pages

后端 未结 11 884
夕颜
夕颜 2020-12-29 03:36

In my ASP.NET web application, I have defined custom error pages in my web.config file as follows:



        
11条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-29 03:47

    I think you'd instead implement/use the Application_Error event in Global.asax, and do your processing/redirects there.

    Providing you call Server.ClearError in that handler, I don't think it will use the customErrors config at all.

提交回复
热议问题