Whenever something goes wrong in SharePoint, you are greeted with a non-useful error message like below -
SharePoint 2007 - An unexpected error has occurred.SharePoint 2010 - An unexpected error has occurred.
SharePoint 2013 - Sorry, something went wrong.
Display meaningful and developer-friendly error
Make the following changes to the corresponding web.config file of your site by following the below steps.
- Navigate to the virtual directory of your web application (usually located at C:\inetpub\wwwroot\wss\VirtualDirectories). For example, if your site is hosted on port 80 then open the folder 80.
- Locate web.config file and create a backup (backup is very important, just in case something goes wrong)
- Open the web.config in any editor which you are comfortable (Notepad, Notepad++, WordPad, EditPlus, Word, etc). Visual Studio will be my preferred editor.
- Locate the tag
. There is an attribute CallStack which is set to False by default. Set this attribute to True. This will allow SharePoint to enable stack trace and display the actual details of error/exception. - Locate the tag
. There is an attribute mode which is set to On by default. Set this attribute to Off. This will enable custom errors instead of showing user-friendly messages. - Refresh the page with the error and now you should see more details that are useful to the developer for troubleshooting.
- This is how your changes should look.
<SafeMode CallStack="true" ............... >
<customErrors mode="Off" />
⚠️ Important: This is recommended only in Development environments and you should not fiddle with the web.config in production environments. The purpose of enabling and custom errors and complete stack trace is only for easier troubleshooting and developers are recommended to revert the changes once development is completed.
More Posts related to SharePoint,
- SharePoint error - An exception occurred when trying to issue security token: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms..
- PowerShell iterate and get all SharePoint sites and sub sites
- SharePoint Online: Editing session has ended Message
- How to Share Microsoft SharePoint Site with Users or Groups
- How to delete SharePoint Online List Item using REST API
- SharePoint List excel import - This table exceeds the maximum number of supported rows
- How to disable SharePoint subsite creation option for owners
- SharePoint 2010 August 2015 Update KB3055049 - Duplicate Document ID issue bug fixed
- SharePoint Server 2016 Preview installation error - This Product Key isn't a valid Microsoft Office 2016 Product Key. Check that you've entered it correctly.
- How to upload file programmatically to SharePoint Document Library using Server Object Model C# .Net
- Access URL for SharePoint Tenant Admin Center (Online Office 365)
- Error when deleting SharePoint Online folder or file
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365
- How to generate client id and secret to register SharePoint App with OAuth
- How to delete SharePoint List Item programmatically using C#.Net
- How to retrieve all SharePoint Online List Items using Rest API
- [Solved] SharePoint Search Internal server error exception
- Create SharePoint Site Collection using PowerShell New-SPSite
- Fix SharePoint PowerShell error - The term Get-SPweb is not recognized as the name of a cmdlet function script file or operable program
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- SharePoint Server 2016 installation System Hardware requirements
- How to create SharePoint Online List Item using REST API
- Changed AD user display name showing old name in SharePoint
- Recommended size and resolution for SharePoint Online Site logo
- Microsoft 365: How to Turn Off Delve in SharePoint Online for All Users
More Posts:
- Docker - Incompatible CPU detected - M1/M2 Mac (macOS Sonoma) - Docker
- How to install npm on Ubuntu - Linux
- Command to check Last Login or Reboot History of Users and TTYs - Linux
- How to Copy all text to Clipboard in Vim - vi
- Program 38: Store two numbers in variables and print their sum - Python-Programs
- Fix - Microsoft Teams Operation Failed With Unexpected Error - Teams
- Bash Command to Find OS Version in Terminal - Bash
- How to check PowerShell version - Powershell