The following configuration code example specifies the error handling pages to use for an ASP.NET application.
The custom errors are only issued for the elements that are handled by ASP.NET. For example, if you refer to a non-existing .htm page, Microsoft Internet Information Services (IIS) issues the standard 404 error. If you refer instead to a non-existing .aspx page, ASP.NET issues the custom 404 error, if you configured the error.
|
<configuration>
<system.web>
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly">
<error statusCode="500"
redirect="InternalError.htm"/>
</customErrors>
</system.web>
</configuration>
|