I have an error handler in the global.asax Application_Error method when an error occurs. I use the following code to transfer the user to the error page:
Server.Transfer("/Error/");
However, without specifying the actual name of the page, the code described above is broken into " Error executing child request on / Error / ".
Therefore, if I use Server.Transfer("/Error/Default.aspx") , it works fine without problems.
Also, using Response.Redirect("/Error/") works fine, however we want to continue to use Server.Transfer to keep the URL displayed in the address bar when the error page is displayed, so that users can simply refresh the page. to repeat access to the original URL.
I would appreciate it if anyone could comment on how to get the Server.Transfer method without specifying the actual aspx page name.
Many thanks.
Maya
source share