Skip to content

Disable ASP.NET Custom Errors in Web.Config

June 7, 2013

Many times during the processing of an ASP.NET application, you will get the following runtime error.

Server Error in ‘/’ Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a “web.config” configuration file located in the root directory of the current web application. This tag should then have its “mode” attribute set to “Off”.

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the “defaultRedirect” attribute of the application’s configuration tag to point to a custom error page URL.

Once you’ve located/created web.config edit the lines containing the configuration element. If the element does not exist, add the element under the element.

You can locate the element by CTRL +F

Change the to

Your end result should look similar to the following:

When saved, ASP.NET should restart itself. To test your application, enter the URL in the browser.


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: