Saturday, July 21, 2007

Error Pages : Page level and web.config

Page Level error pages - @Page directive ErrorPage
<%@ Page errorPage=”errpage.aspx””%>
Application wide error pages – Web.config customErrors section

More about customErrors section:
customErrors mode attribute must be set to On to view the error pages while debugging the application on local machine
Setting the mode to RemoteOnly (the default) will display the designated error pages when the application is accessed from client computers, but not when application is accessed locally
customErrors settings in the web.config apply only to resource types that ASP.net considers to be part of the web application
Custom error page will not be displayed when a page with .htm is accessed, to handle such scenarios use IIS settings

No comments:

Post a Comment