SharePoint An unexpected error has occurred - Correlation ID and Merge-SPlogfile


Posted on : Wed, 23rd Sep 15 08:14 am (Updated on : Wed, 23rd Sep 15 08:14 am) UTC
Author : Code2care
2314 votes

When SharePoint throws an error, it just says "An unexpected error has occurred" and expects the developer to put more efforts for finding the exact issue. That is quite frustrating at times !!

A generic and most famous SharePoint error looks like below.

Generic SharePoint error - An unexpected error has occurred

The "Troubleshoot issues with Microsoft SharePoint Foundation." is not helpful at all.
The error message might not seem helpful at first, but it provides you 2 important parameters which are helpful in troubleshooting the actual issue -

  1. Correlation ID – It is a GUID associated with the error messages which is logged by SharePoint
  2. Date and Time – The Time Stamp when this error occurred

The SharePoint Logs are stored on your Server – HIVE\LOGS (usually HIVE is – C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions)
Scan through all your logs, find the relevant log (based on date-time) which should have your error details (use the 'Date and Time' value). Then open the file and search for the 'Correlation ID', this will give you more specific details about the error.

This could take up some time for reaching the exact error and issue. Is there an easier way ? -Yes.

  1. PowerShell Merge-SPlogfile - Use this PowerShell command to filter logs based on Correlation ID http://code2care.org/2015/merge-splogfile-sharepoint-correlation-id-error
  2. SharePoint ULS Log Viewer - This is free Codeplex tool for viewing ULS logs http://ulsviewer.codeplex.com

Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

Follow us : Facebook - Twitter - Google +