Disable ASP.NET "Friendly" Error Messages
Article Contents:
By default, SharePoint sets ASP.NET to display "friendly" error messages to the end user. For example, a "friendly" error message in SharePoint might look like this:

Sometimes for troubleshooting, it is necessary to disable this default behavior and allow ASP.NET to display a "full stack trace", such as this:

To override the default behavior and see a full stack trace, you must edit the settings of the web.config files in these two locations on each web front-end server in your SharePoint farm:
- web application web.config file (controls SharePoint's display of error messages)
- "Layouts" folder web.config file (controls custom ExCM page's display of error messages)
Follow the steps below to disable friendly error messages in these files.
The edits below will need to be made on each web front-end server in your SharePoint farm.
- Open IIS Manager by typing INETMGR at a command prompt
- Go to your extranet site in IIS Manager, right-click select Explore
- Make a backup copy of your web.config file
- Using Notepad or another text editor, open the web.config file
- In the SafeMode tag, set the CallStack attribute to 'true' (note: this is case sensitive)
- In the customErrors tag, set the mode attribute to 'Off' (note: this is case sensitive)
- Refresh the SharePoint page containing the error, view the error message along with the error stack trace.
| Turn Off Extanet Site Friendly Error Messages in web.config file |
|
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
...
<customErrors mode="Off" />
|
- Open a file explorer and browse to the 'C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions15TEMPLETELAYOUTS' directory (note: for SharePoint 2016 replace "15" with "16" in this path)
- Make a backup copy of your web.config file
- Using Notepad or another text editor, open the web.config file
- In the customErrors tag, set the mode attribute to 'Off' (note: this is case sensitive)
- Refresh the Layouts page containing the error, view the error message along with the error stack trace.
| Turn Off Layouts Friendly Error Messages |
|
<customErrors mode="Off" />
|
©2019 PremierPoint Solutions. All Rights Reserved.