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.
- Managed Metadata error - The data returned from the tagging UI was not formatted correctly
- How to generate client id and secret to register SharePoint App with OAuth
- Create SharePoint Site Collection with new Content database in existing web application
- Fix Error 2711 SQL RBS client - The installer has encountered an unexpected error. The specified Feature name ('Docs') not found in Feature table
- How to exclude results from SharePoint Search
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher
- [Solved] SharePoint Access Denied error editing Document Name
- Recommended size and resolution for SharePoint Online Site logo
- SharePoint Server 2016 IT Preview - new improved Features and Enhancements
- Restore deleted Office 365 SharePoint group site
- SharePoint An unexpected error has occurred - Correlation ID and PowerShell Merge-SPlogfile
- [Solved] SharePoint Search Internal server error exception
- SharePoint CAML query error - The XML source is not correct
- How to hide quick launch in SharePoint classic site
- Not receiving email notification alert in SharePoint Online workflow - Power Automate, FLOW
- Change SharePoint search results FullTextSqlQuery RowLimit 10000
- Fix Power BI error Access to the resource is forbidden when connecting SharePoint Online List as data source
- [Fix] Restricted View permission level missing in SharePoint Online site library
- How to upload file programmatically to SharePoint Document Library using Server Object Model C# .Net
- How to create classic site in SharePoint Online
- That did'nt work, Issue type User not in directory - SharePoint external access error
- Merge-SPlogfile PowerShell - SharePoint Correlation ID error
- Fix Power BI 404 not found error when connecting SharePoint Online List as Data Source
- SharePoint Server 2016 IT Preview Deprecated Removed features
- SharePoint error - An exception occurred when trying to issue security token: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms..
- How to upgrade pip/pip3 package installer for Python - PIP
- How to Save Eclipse console logs in external log file - Eclipse
- zsh hello world example - Linux
- How to repeat background image in Android Activity - Android
- #HappyBirthdayJimin trending Happy Birthday Jimin BTS Army - BTS
- import servlet API to eclipse project (javax.servlet cannot be resolved error) - Java
- Disabling Spell Check in Android Studio - Android-Studio
- [Solved] Notepad++ Menu Bar Missing - NotepadPlusPlus