Intellect Connect

The Server Experts at your Service

How to Disable ASP.NET Custom Errors in Web.config

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

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.
Details: To enable the details of this specific error message to be viewable on the local server machine, 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 “RemoteOnly”. To enable the details to be viewable on remote machines, please set “mode” to “Off”.

This is a generic error generated by ASP.NET When customErrors are set to ON. To resolve this issue, create a web.config file if one is not already present in your C:\Inetpub\wwwroot\yourdomain directory.

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 hitting CTRL+F and searching for it.

Change the to

<customErrors mode="On"/> to <customErrors mode="Off"/>

Note: It is case sensitive – it must be “Off” and not “off”.

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

Your final result should be a completely different (and detailed) ASP.NET error page, similar to the following.

If you need any assistance with this process, or encounter any issues, please don’t hesitate to contact our Technical Support Department.

footer-logos