Hi if a request from my website is containing some errors(database linking errors) then asp.net host server error page is displaying but i want to avoid the error page and i hav to display my own custom designed error page instead.
Hi if a request from my website is containing some errors(database linking errors) then
Share
Add the
customErrorselement as shown below to yourweb.configfile in the appropriate place:Setting the
modeattribute toOnensures that the error page is shown to everybody. You can set the attribute toRemoteOnlyif you want to show the error page to remote users only; local users will then see the error page containing the exception details instead, which may simplify development.If you want to read more about this subject, I’d recommend to have a look at the following article from the official ASP.NET site: Displaying a Custom Error Page