如何在SharePoint 2013中启用开发人员仪表板?

时间:2014-08-25 16:49:05

标签: sharepoint sharepoint-2013

我想在SharePoint 2013中启用开发人员信息中心 我遵循了一些措施,但没有奏效。

我的代码是:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

   namespace ConsoleApplication1
   {
   class Program
   {
       static void Main(string[] args)
       {
        //get dashboard setting objects
        SPDeveloperDashboardSettings dashboard_settings = SPWebService.ContentService.DeveloperDashboardSettings;

        dashboard_settings.DisplayLevel = SPDeveloperDashboardLevel.On;
        //---enable trace
        dashboard_settings.TraceEnabled = true;
        dashboard_settings.Update();
       }
   }
}

如果有人提供示例代码的详细示例,我们将不胜感激。

1 个答案:

答案 0 :(得分:0)

可以使用PowerShell完成,并且还需要启用使用率和运行状况数据集。

请检查:http://www.sharepoint-journey.com/developer-dashboard-in-sharepoint-2013.html