{"id":228,"date":"2010-05-05T16:53:35","date_gmt":"2010-05-05T14:53:35","guid":{"rendered":"http:\/\/www.itidea.nl\/wordpress\/?p=228"},"modified":"2015-09-08T20:33:00","modified_gmt":"2015-09-08T18:33:00","slug":"developer-dashboard","status":"publish","type":"post","link":"https:\/\/www.itidea.nl\/index.php\/developer-dashboard\/","title":{"rendered":"Developer Dashboard"},"content":{"rendered":"<p>The Developer Dashboard is great to see what\u2019s going on when loading a page in SharePoint 2010.<\/p>\n<p>Windows PowerShell is THE application to enable\/disable the Developer Dashboard in SharePoint 2010. Here are the commands:<\/p>\n<p>$service=[Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashBoardSettings;<br \/>\n$service.DisplayLevel = \u201cOn\u201d;<br \/>\n$service.Update();<\/p>\n<p>The displaylevel can be On, Off or OnDemand. When set to OnDemand an icon is added to the top right corner to toggle the On\/Off state of the Developer Dashboard (enlarged):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"52\" height=\"52\" class=\"size-full wp-image-229 alignnone\" title=\"DeveloperDashBoard\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/05\/DeveloperDashBoard.png\" alt=\"Developer DashBoard\" \/><\/p>\n<p>The DisplayLevel is an enumerator used to specify behavior aspects of the Developer Dashboard, check also <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.sharepoint.administration.spdeveloperdashboardlevel(v=office.14).aspx\" target=\"_blank\">MSDN<\/a>:<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"819\">\n<tbody>\n<tr>\n<td width=\"200\" valign=\"top\"><strong>Member<\/strong><\/td>\n<td width=\"617\" valign=\"top\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"200\" valign=\"top\">Off<\/td>\n<td width=\"617\" valign=\"top\">Enumeration value = 0: Dashboard feature is disabled<\/td>\n<\/tr>\n<tr>\n<td width=\"200\" valign=\"top\">OnDemand<\/td>\n<td width=\"617\" valign=\"top\">Enumeration value = 1: Dashboard feature is available on request<\/td>\n<\/tr>\n<tr>\n<td width=\"200\" valign=\"top\">On<\/td>\n<td width=\"617\" valign=\"top\">Enumeration value = 2: Dashboard feature is enabled<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>When you receive the following error:<br \/>\nUnable to find type [Microsoft.SharePoint.Administration.SPWebService]: make sure that the assembly containing this type is loaded.<\/p>\n<p>Two solutions:<\/p>\n<ol>\n<li>You are running Windows PowerShell in stead of SharePoint 2010 Management Shell:<br \/>\nuse SharePoint 2010 Management Shell.<\/li>\n<li>You are running Windows PowerShell in stead of SharePoint 2010 Management Shell:<br \/>\nmake Windows PowerShell behave like the SharePoint 2010 Management Shell by running \u2018add-pssnapin microsoft.sharepoint.powershell\u2019 in Windows PowerShell.<\/li>\n<\/ol>\n<p>Want to include some of your own code in the monitoring of the dashboard?<br \/>\nJust wrap it up\u00a0in\u00a0a new\u00a0SPMonitoredScope:<br \/>\n\u00a0using (SPMonitoredScope scope = new SPMonitoredScope(&#8220;MyMonitoring&#8221;))<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/your code to monitor here<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<\/p>\n<p>And the result in the dashboard:<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/05\/MyMonitoring.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-427\" title=\"MyMonitoring\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/05\/MyMonitoring.png\" alt=\"\" width=\"310\" height=\"111\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/05\/MyMonitoring.png 310w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2010\/05\/MyMonitoring-300x107.png 300w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Developer Dashboard is great to see what\u2019s going on when loading a page in SharePoint 2010. Windows PowerShell is THE application to enable\/disable the Developer Dashboard in SharePoint 2010. Here are the commands: $service=[Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashBoardSettings; $service.DisplayLevel = \u201cOn\u201d; $service.Update(); The &#8230; <a class=\"more-link\" href=\"https:\/\/www.itidea.nl\/index.php\/developer-dashboard\/\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[43,42],"class_list":["post-228","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2010","tag-powershell","tag-sharepoint-2010"],"_links":{"self":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/comments?post=228"}],"version-history":[{"count":7,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":233,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/228\/revisions\/233"}],"wp:attachment":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/media?parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/categories?post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/tags?post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}