Friday, May 20, 2011

"SharePoint 2007 to 2010 Upgrade" online project: Developer dashboard on the custom page\

Started migration SharePoint 2007 site definition to SharePoint 2010. I keep old look and feel. My site has own custom master page. After migration the remains untouched which is not bad thing. But there is one drawback I have found so far: There is not button to turn Developer Dashboard on my custom Even though I ran the command: 
$DevDashboardSettings = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$DevDashboardSettings.DisplayLevel = 'OnDemand';
$DevDashboardSettings.RequiredPermissions = 'EmptyMask';
$DevDashboardSettings.TraceEnabled = $true;

 This is actually an expected behavior. The  DelegateControl is placed in the new master page - v4.master.
Since I use my old one - the control just is not there.

To make use of the Developer Dashboard on the custom master page, modify the custom master page with following:

Just put the following control under <SharePoint:DelegateControl ControlId="GlobalSiteLink1" Scope="Farm" runat="server"/> : 
        Width=16 />

And put the DeveloperDashboard control at the bottom somewhere (I have chosen to put it in the ContentPlaceHolder id="PlaceHolderUtilityContent"):

 <asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server"> 
    <SharePoint:DeveloperDashboard runat="server" />
<div id="DeveloperDashboard" class="ms-developerdashboard" />

2010! Here I come