Thursday, September 15, 2011

CorrelationID..........No...i don't want to see that...on my what....

CorrelationID, i believe everyone have seen this message in day to day work with SharePoint, So what you do after clue....send a mail to admin and ask him what' s the issue and fix it....believe me it's simple to see what's the real issue and fix it. Here we have few tools and options to help....

Callstack, compilation, and customErrors. These are three attributes you can change to true, @debug=true, and @mode=Off, that allow you to view an exception text right on the web page.

Developer Dashboard: The Developer Dashboard is a new addition in SharePoint 2010. It gives you a convenient way to view the details of any particular page rendering down to the database and WCF calls complete with exception traces, warnings, and time durations. You can enable Developer Dashboard by using the following command
stsadm -o setproperty -pn developer-dashboard -pv OnDemand

Event Viewer: The Event Viewer in Windows is an amazing insight into the innards of SharePoint. Some errors will surface only within the Event Viewer. Anecdotally I can tell you that many WCF errors, including those for out-of-the-box WCF services such as those for claims based authentication, seem to merrily log their errors in the Windows Event Log.

ULS Viewer: ULS is the unified logging service - which in itself has seen enhancements as compared to the SharePoint 2007 version. You can download this tool from, which lets you view ULS errors at runtime as they occur, and filter using CorrelationIDs.

CorrelationIDs: Technically this is a part of the ULS log, but not really. Classically reading ULS logs has been tough. Those multiple log files are quite wide, so you have to scroll around and sift through many such log files, line breaks, etc., to find the error trace you are looking for. Starting with SharePoint 2010, Microsoft gives you a unique ID, a GUID, for each error that occurs. This is the CorrelationID. You can use CorrelationIDs to put together the full error message as it occurred, even across multiple machines. And this can be done easily using the ULS Viewer that I mentioned above.

Fiddler: You can download Fiddler from Fiddler introduces a proxy for your browser and starts to sniff all local http traffic going back and forth from your machine. It is an invaluable tool for debugging REST-based APIs and client object model calls. Starting with Internet Explorer 9, you have a network monitor built right into your browser, or you can also use Firebug, Chrome extensions, etc.

Internet Explorer extensions: Open any SharePoint page, and hit F12. This will bring up the developer extensions for Internet Explorer. Using this you can very easily run small JavaScript commands, change CSS on the fly, and change the DOM of the page entirely if you wish, or even step through JavaScript. In crafting up modern day rich client side applications, I have found this utility to be extremely valuable.

IIS 7 trace and logs: Managed code is awesome. And as more and more Microsoft products are whole heartedly adopting the managed code bandwagon, they are reaping amazing benefits from it. One such product is IIS7. With its integrated pipeline and error logging and tracing, it literally tells you what line an exception occurred at - along with a full stack trace, and http error codes. I can’t tell you how much I have found this useful in diagnosing really hard to discover HTTP 401s (HTTP Unauthorized), especially when diagnosing search, reporting services, etc. Security is a good thing, but it can also be a real pain sometimes.


No comments: