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.
- PowerShell - How to use Try Catch Finally blocks for error exception handling (Windows/SharePoint)
- SharePoint List excel import - This table exceeds the maximum number of supported rows
- Update SharePoint Online List Item using REST API, HTML, Spfx, Postman
- Fix SharePoint Error - The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started
- SharePoint list excel import error - Title is a required filed and can't be empty
- Move Copy Migrate SharePoint OneDrive files folders to different site collection location
- Create SharePoint list from Excel spreadsheet and import table
- Send Email using SharePoint PowerShell command, SMTP server
- [Fix] Restricted View permission level missing in SharePoint Online site library
- How to get SharePoint List Item URL using PowerShell
- The service instance
- How to get the SharePoint Tenant Login URL
- New-SPLogFile PowerShell - create new SharePoint log file
- Not receiving email notification alert in SharePoint Online workflow - Power Automate, FLOW
- 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 change order of fields on new item form for SharePoint Online list
- Update Created By (Author) column of SharePoint document using PowerShell
- How to delete SharePoint Online List Item using REST API
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher
- Create SharePoint Site Collection using PowerShell New-SPSite
- How to customize SharePoint Modern list form using JSON formatting
- How to get SharePoint Online user details from person or group column using REST API
- SharePoint excel error - A problem occurred while connecting to the server. If the problem continues, contact your administrator.
- How to create SharePoint List Item programmatically using C#.net
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell
- 25 Notepad++ Command Argument List - NotepadPlusPlus
- Calculate Volume of Cube - C-Program
- How to make a div tag clickable - Html
- Gmail Error Bad Request Your client has issued a malformed or illegal request - Google
- 30+ Zoom video communications application shortcuts for macOS - MacOS
- How to reset eclipse layout - Android
- How to upgrade Docker Desktop on Mac - MacOS
- Uber and UberEats App down - issues with network, login, navigation, fare price, orders - News