by Tobias Lekman, 16 March, 2011
This is a quick video-based guide on how to troubleshoot errors and issues in SharePoint 2010. In this post, we will go through looking for detailed errors in logs, in code and finding what component causes issues on a specific page.
The Unified Logging Service, or ULS, is a file-based log system that contains errors generated from SharePoint. It uses correlation ID to map the user error to the log entry. The files get large and are hard to navigate, so I recommend using the ULS Log Viewer on CodePlex.
In the following video, we will track down an error using correlation ID using the logs and the CodePlex log viewer:
You can either edit the web.config of the web application and add the following changes:
To make this a little bit easier, I have wrapped the changes in a feature that can be downloaded from CodePlex. The following video shows how to install the feature, enable debugging and see the difference in SharePoint:
The developer dashboard is a page level tracing mechanism that allows you to view detailed information about the entire call stack in all modules that execute within the context of a page. This allows us to find detailed information about slow rendering of pages and see what component on the page is causing the issue.
You enable the dashboard using the command "stsadm -o setproperty -pn developer-dashboard -pv ondemand". The following video shows how to enable the dashboard.
The page trace shows different components and method calls in a hierarchical structure called a monitored scope. You can easily extend the trace within your own webpart by encapsulating your call in an SPMonitoredScope. For some good information on how to extend the trace using SPMonitoredScope, see Tobias Zimmergren's blog post "Developing for Performance, Part 2".