Below we'll walk you through setting up custom errors in web.config
You may be publishing an application only to later see this error below instead of your content. This error itself is not really verbose, so you will need to enable custom errors.
You will need to edit your web.config file which should be located in /site/wwwroot/.
Below the "system.web" flag add <customErrors mode="Off"/>
and publish the new changes. It should look something like this:
###Example of a custom error
Now that you've saved your changes, your website should display the custom error that should look something like this. Now we've determined that there is a coding error on line 4 under Default.aspx.cs
Enabling custom errors is recommended when you see a Server Error so you know where to start your troubleshooting. You can also enable Site Diagnostics and we have a guide included here.
Tip: Are you using Classic ASP and can't enable errors? We have an article for that provided here.
Want to edit or suggest changes to this content? You can edit and submit changes to this article using GitHub.