Last post Jun 14, 2017 07:02 AM by Zhi Lv - MSFT
Jun 13, 2017 08:38 AM|jos3|LINK
I have written the Application_Error in Global.asax to redirect to a new page in case of any error occurs, besides, I have modified the Web.config to enable custom errors. When an error happen it display the same error twice in the same page. How can I configure
<customErrors mode="On" defaultRedirect="~/Error/ErrorPage.aspx" redirectMode="ResponseRewrite"></customErrors>
Jun 13, 2017 03:16 PM|usmanuzi|LINK
I hope this would help : https://stackoverflow.com/questions/4553566/server-transfer-in-global-asax
Jun 14, 2017 06:16 AM|jos3|LINK
Thanks, but the topic talks about virtual path, not exactly my case
Jun 14, 2017 07:02 AM|Zhi Lv - MSFT|LINK
, I have modified the Web.config to enable custom errors. When an error happen it display the same error twice in the same page. How can I configure Web.config properly?
Could you please explain more details about your problem? Do you want to prevent display the same error twice in the one page? If that is the case, I suggest you check your code in the ErrorPage.
Here are some relevant articles about custom error, you could refer to them: