Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/CloudIngenium.com/htdocs/wp-includes/functions.php on line 6114
How do you display custom error pages on an ASP.Net application? – Knowledge eXchange

How do you display custom error pages on an ASP.Net application?

How can you create custom error pages on an ASP.Net application so that you can better control the user experience when the unexpected happens?

A:

There is a configuration parameter in the Web.Config you can use to control what error pages the user sees:

<customErrors defaultRedirect=”ErrorPage.aspx” mode=”On”>

<error statusCode=”500″ redirect=”servererror.aspx” />

<error statusCode=”404″ redirect=”filenotfound.aspx” />

<error statusCode=”403″ redirect=”AccessDenied.aspx” />

</customErrors>

This section of the web.config has to be placed in the following structure:
<configuration> Element
  system.web Element (ASP.NET Settings Schema)
    <customErrors>
You can obtain more information on how to set this up by visiting the MSDN website. Here is an example obtained from there:

<configuration>

<system.web>

<customErrors defaultRedirect=”GenericError.htm”

mode=”RemoteOnly”>

<error statusCode=”500″

redirect=”InternalError.htm”/>

</customErrors>

</system.web>

</configuration>

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.