Enabling Developer Dashboard in SharePoint 2010
ASP.NET provides Call Stack and Tracing as wonderful features which helps developers on investigating what is going on page rendering behind the scene. SharePoint being a product which provides bunch of features OOTB which we can use to setup a portal very easily, it hides most of these information.
Back in MOSS 2007, we had to scratch our head thinking where to start our investigation when we get an error in the browser, because that error was not descriptive enough for us to start the investigation.
In SharePoint 2010, we have a nice feature – Developer Dashboard which helps developers to be comfortable when they see an error in the browser.
Enabling Developer Dashboard
Developer Dashboard is a feature targeted for developers (administrators as well) and hence it is disabled by default. We need to enable it using one of the method mentioned below:
- STSADM
- PowerShell
- SharePoint Object Model
STSADM
We still can use STSADM with SharePoint 2010 for administering SharePoint. However, STSADM is more likely to disappear in the next release. Though we can use following STSADM command to enable Developer Dashboard, I strongly recommend to get familiar with PowerShell, if you are not already.
- Go to the command prompt and make sure to either set the path to the location of STSADM.EXE or navigate to the bin directory in SharePoint root in your command prompt.
- Issue the following command in the command prompt:STSADM -o setproperty -pn developer-dashboard -pv ondemand
The above command will enable the Developer Dashboard in On Demand mode.
PowerShell
- Go to Start –> All Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell
- Issue the following command in the management shell:$devdash = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$devdash.DisplayLevel = ‘OnDemand’;
$devdash.TraceEnabled = $true;
$devdash.Update()
The above command will enable the Developer Dashboard in On Demand mode.
SharePoint Object Model
- Create a Console Application, Windows Application or Web Site and add a reference to the Microsoft.SharePoint.dll assembly.
- Add using Microsoft.SharePoint.Administration namespace reference at the top of the code (C#) file.
- Add the following code into your code (C#) file to enable Developer Dashboard:SPWebService svc = SPContext.Current.Site.WebApplication.WebService;
svc.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.OnDemand;
svc.DeveloperDashboardSettings.Update();
The above command will enable the Developer Dashboard in On Demand mode.
I have used On Demand as the setting for Display Level of the Developer Dashboard and following are the other options we can specify:
- On – Enable the Developer Dashboard all the times
- Off – Disable the Developer Dashboard
- OnDemand – Enable the Developer Dashboard but will be displayed on demand.
When you enable Developer Dashboard in On Demand mode, following icon will be displayed next to your login name.
On click of the Developer Dashboard icon, page will be reloaded and Developer Dashboard will be displayed at the bottom of the page as shown below:
If you have also used TraceEnabled = $true switch with PowerShell, then you will see a link says “Show or hide additional tracing information …” at the end of the Developer Dashboard which allows you to show/ hide ASP.NET Tracing information as shown below:
Isn’t this a awesome feature for you to get started your investigation exercise? Have a closer look at what Developer Dashboard offers you and it will help you in numbers of ways.
Fix it – Configuring Object Cache service
If you are using Web Content Management (WCM) solutions implemented with SharePoint 2010 Publishing Infrastructure features, you will notice following Critical error in your server Event Log.
What does it mean and how do you fix this?
This error is generated by SharePoint’s Object Cache service. In order to get rid of this error, you will have to configure Object Cache service.
What is Object Cache service?
Object Cache is a very powerful built-in service in SharePoint 2010 Publishing Infrastructure which instructs every Web Front End (WFE) to cache object properties in order to boost the performance. This reduces the load on SQL Server tremendously by reducing number of round trips required to retrieve same data from the content databases. In scenarios where you have Web Content Management solutions which go through less content changes, by configuring Object Cache, you can reduce the latency and increase the throughput.
Configuring Object Cache is all about configuring User Policies for each and every Web Applications. Object Cache is configured at the Web Application level and you need to have 02 AD user accounts for configuring Portal Super User and Portal Super Reader. Portal Super User account has full control and Portal Super Reader account has full read-only access.
Let us begin the configuration.
Task 1 – Create required AD accounts
You need to create 02 service accounts in order to configure Portal Super User and Portal Super Reader. Go to Active Directory and create 02 service accounts.
I already have 02 service accounts created named, SP_ObjectCacheUser and SP_ObjectCacheReader.
Task 2 – Configure Object Cache User Accounts using CA
Initial configuration done using CA.
- Fire up the SharePoint 2010 Central Administration site by navigating to Start –> All Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Central Administration.
- Select Manage web applications link from the Application Management group.
- Select the web application you are planning to configure Object Cache. In my environment, for this demo, I’m selecting SharePoint – 80 web application.
- Click the User Policy from the Policy group in the ribbon.

- Click Add Users link in the Policy for Web Application dialog box.

- Select (All Zones) for the Select the Zone field in the Add Users dialog box and click Next > button.

- Enter the Portal Super User account for the Choose Users field and select Full Control from the Choose Permissions section and click Finish. In my demo, I have configured SP_ObjectCacheUser as the Portal Super User.

- Click Add Users link again in the Policy for Web Application dialog box.
- Select (All Zones) for the Select the Zone field in the Add Users dialog box and click Next > button.
- Enter the Portal Super Reader account for the Choose Users field and select Full Read from the Choose Permissions section and click Finish. In my demo, I have configured SP_ObjectCacheReader as the Portal Super Read.

- Policy for Web Application dialog box now will look following.

Task 3 – Committing configuration changes using PowerShell
Final step is to commit configuration changes using PowerShell.
- Fire up SharePoint 2010 Management Shell by navigating to Start –> All Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell.
- Enter the following PowerShell commands to update the settings. Change the Web Application name placeholder depending on the name of the Web Application.$wa = Get-SPWebApplication – Identity “SharePoint – 80”
$wa.Properties[“portalsuperuseraccount”] = “CONTOSO\SP_ObjectCacheUser”
$wa.Properties[“portalsuperreaderaccount”] = “CONTOSO\SP_ObjectCacheReader”
$wa.Update()

Now you will not see the earlier Critical error in your server Event Log as well as you will experience a reduced latency and an improved throughput.
Introducing Edit Control Block (ECB)
Most of us who use SharePoint product have been using following menu a number of times. But how did you refer to this menu? How do you call this menu? I have heard people call this menu as "this drop down menu", "this document specific menu", "this item specific menu", "this document edit menu", "this item edit menu", etc…
What is the actual name for this flying menu when you click the down arrow next to the item/ document Name?
This is called "Edit Control Box (ECB)". Now onward, you guys should get used to using this right name instead of calling it "this menu", "that menu", etc…



