Creating an error in SharePoint 2010


Every once in a while, I give a SharePoint 2010 training, where the main focus lies in the infrastructural background.
One of these aspects is the monitoring of SharePoint 2010 and how to manage it and troubleshoot the best way possible. To do this, I use the ULSViewer.

You would think that it is pretty easy to create an error, seeing as how often you get an “unexpected error” in SharePoint. To make things easier, I found this article by Todd Carter. He shows a way to create custom error pages.

This gave me the idea to use the bug he pointed out, to demonstrate the ULS viewer.
From here it is pretty straightforward.
I opened the ULS viewer to start scanning my ULS by pressing CTRL + U. The ULS Viewer will automatically find the location of the logs and will open it real-time.

Using the bug, I navigated to “http://yourdomain.com/_layouts/Error.aspx?ErrorText=Error for demo purposes.”. I have registered this domain in my local DNS file for demonstrating purposes.
This shows the following screen:

image

Using the ULS viewer, i filtered the log for correlation ID “fb134e8c-553b-47ff-9a5d-e81d329e10dd “.

Now, the log has been filtered only to see the error I had created!

image

Of course, in this case, the only message that is visible is the GET request for the error page, but it did the trick!

Advertisements

2 thoughts on “Creating an error in SharePoint 2010

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s