- Administering Features and Solutions
- Administering Sandboxed Solutions
- Administering the Developer Dashboard
A. Administering Features and Solutions
A. 1. Administering Features
- Log on to SP2010-WFE1 as CONTOSO\SP_Admin, with its password.
- Open Windows Internet Explorer.
- In the address bar, type http://intranet.contoso.com, and then press ENTER.
- Click Site Actions, and then click View All Site Content.
- Click Create. The Create page appears.
- Observer that a calendar or contact list are not shown as available options.
- Close the Create page.
- Click Site Actions, and then click Site Settings.
- In the Site Actions section, click Manage site features.
- In the Team Collaboration Lists row, click Activate.
- Click Site Actions, and then click View All Site Content.
- Click Create. The Create page appears.
- Observer that you can now create a calendar or contact list.
- Close the Create page.
A. 2. Install a custom feature
- Right-click the CustomAction folder, and then click Copy.
- In Windows Explorer, browse to C:\Program Files\Common Files\Microsoft Shared\Web server extensions\14\Template\Features.Each folder in the Features folder represents a feature on the Microsoft Sharepoint server.
- Press CTRL+V to pase the CustomAction folder into the Features folder.
- Close the Features folder window.
- Click Start, then click All programs, then click Microsoft Sharepoint 2010 Products, then right-click Sharepont 2010 Management Shell, and then click Run as administrator.
The User Account Control dialog box appears. - Click Yes.
- Type the following command and then press ENTER.
stsadm -o installfeature -filename CustomAction\feature.xml
This will install a new feature into Sharepoint that enables a simple custom action in the Site Actions menu.
A. 3. Activate and test a custom feature
- Switch to IE.
- Click Site Actions, and then click Site Settings.
- In the Site Actions section, click Manage site features.
- In the JavaScript Dropdown item row, click Activate.
- Click Site Actions, and then click A Custom Action. A Message from webpage window appears with the message. Hello World.
- Click OK.
- Click Site Actions, and then click Site Settings.
- In the Site Actions section, click Manage site features.
- In the JavaScript Dropdown item row, click Deactivate. A warning page appears.
- Click Deactivate this feature.
- Click Site Actins, then observer that A Custom Action no longer appears, and then press ESC to close the menu.
B. 1. Install a solution
- Switch to Sharepoint 2010 Management Shell.
- Type the following commands:
stsadm -o addsolution -filename "d:\labfiles\ApplicationTemplateCore.wsp"
stsadm -o addsolution -filename "d:\labfiles\BugDatabase.wsp" - Close Sharepoint 2010 Management Shell
- Open Sharepoint 2010 Central Administration. The User Account Control dialog box appears.
- Click Yes.
- In the Quick Launch, click System Settings.
- In the Farm Management section, click Manage farm solutions.
- Observe that the two solutions are installed, but are not deployed.
- Click applicationtemplatecore.wsp
- Click Deploy Solution
- Review the settings, and then click OK
- Click Bugdatabase.wsp
- Click Deploy Solution
- Review the settings and then click OK.
- In the address bar, type http://intranet.contoso.com/sites/IT, and then press ENTER.
- Click Site Actions, and then click New Site.
- In the left navigation, click the Application Templates tab, and then click Bug Database.
- In the Ttitle box, type Bug Tracking.
- In the URL name box, type Bugs.
- Click Create. A new bug database Web is created in the IT site collection.
- In the address bar, type http://intranet.contoso.com/sites/IT/Bugs, and then press ENTER.
- Close all windows.
C. 1.Administering Sandboxed Solutions
C. 1. 1. Ensure that the code service is running
- Click Start, then click Administrative Tools, and then click Services.
- Right-click Sharepoint 2010 User Code Host, and then click Properties.
- Verify that the service is not started, and that the Startup type is Disabled.
- Click OK.
- Open Sharepoint 2010 Central Administration. The User Account Control dialog box appears.
- Click Yes.
- In the Quick Launch, click System Settings.
- Click Manage services on server.
- In the Microsoft Sharepoint Foundation Sandboxed Code Service row, click Start. The Service status changes to Started.
- Switch to the Services console.
- Right click Sharepoint 2010 User Code Host, and then click Properties.
- Verify that the service is started, and that the Startup type is Automatic.
- Click OK.
- Close the Services console.
- Switch to IE.
- In the address bar, type http://intranet.contoso.com/sites/IT, and then press ENTER.
- Click Site Actions, and then click Site Settings.
- In the Galleries section, click Solutions.
- On the ribbon, click the Solutions tab, and then click Upload Solution.
- Click Browse.
- Select D:\files\badreceiver.wsp.
- Click Open.
- Click OK.
- On the ribbon, click Activate. The Badreceiver solution is displayed with a status of Activated.
- Click Site Actions, and then click Site Settings.
- In the Site Actions section, click Manage site features.
- In the Badreceiver feature1 row, click Activate
- In the Quick Launch, click All Site Content.
- Click Announcements
- On the ribbon, click the Items tab.
- Click New Item.
- In the Title box, type My Announcement.
- Click Save. An error message appears.
- Click Go back to site.
- Click Site Actions, and then click Site Settings.
- In the Galleries section, click Solutions.
C. 2. 1. Run sandboxed solution timer jobs
- Open Sharepoint 2010 Central Administration. The User Account Control dialog box appears.
- Click Yes.
- In the Quick Launch, click Monitoring.
- In the Timer Jobs section, click Review Job definitions.
- Locate the Solution Resource Usage Update timer job for Sharepoint - intranet.contoso.com80.
- Click Solution Resrouce Usage Update in the Sharepoint - intranet.contoso.com80 row.
- Click Run Now.
- Click Solution Resource Usage Log Processing in the Sharepoint - intranet.contoso.com80 row.
- Click Run Now.
- Switch to the instance of Internet Explorer that is displaying the Solutions Gallery.
- Press F5 to refresh the page.
C. 3. Configuring Sandbox Points
C. 3. 1. Review default resource measures
- Run Sharepoint 2010 Management Shell as administrator. The User Account Control dialog box appears.
- Click Yes.
- To export a list f default point values, type the following command and then press ENTER
$spusercodeservice = [Microsoft.Sharepoint.Administration.SPUserCodeService] : : Local
$spusercodeservice.ResourceMeasures > C:\ResourceMeasures.txt - Open the file C:\ResourceMeasures.txt. This file contains a listing of the resource measures that are monitored for sandboxed solutions.
- To find the section for database queries, press CTRL+F, then type SharepointDatabaseQueryCount, and then press ENTER.
- Record the content values of ResourcesPerPoint and AbsoluteLimit.
- Close the file.
- Switch to Administrator: Sharepoint 2010 Management Shell.
- Type the following command:
$spusercodeservice = [Microsoft.Sharepoint.Administration.SPUserCodeService] : : Local
$obj = $spusercodeservice.ResourceMeasures["SharepointDatabaseQueryCount"]
$obj.ResourcesPerpoint = 1
$obj.Update()
$obj | Select-Object Name. ResourcesPerPoint
This script sets the ResourcePerpoint property for SharepointDatabaseQueryCount to 1 and will cause Sharepoint database queries to increase the resource usage point count very quickly. - Type the following command
iisreset
IIS restarts and enables the new resource settings. - Close Administrator: Sharepoint 2001 Management Shell.
- Switch to the instance of Internet Explorer that displays the IT intranet Web. It will take a few seconds to load the Web because you recently reset IIS.
- In the Quick Launch, click All Site Content
- Click Announcements
- On the ribbon, click items
- Click New item
- In the Title box, type My Next Announcement.
- Click Save. An error message appears.
- Click Go back to site.
- Click Site Actions, and then click Site Settings.
- In the Galleries section, click Solutions.
- Repeat part C.2.1 to run the sandboxed solutions timer jobs.
- Switch to the instance of Internet Explorer that displays the Solutions gallery for the IT intranet Web
- Press F5 to refresh the page.
- Observe that the resource usage of the solution is increasing more rapidly.
- Click Site Actions, then Site Settings.
- In the Galleries section, click Solutions
- Click the Bad Receiver row.
- On the ribbon, click Deactivate. The Solution Gallery - Deactivate Solution page opens.
- On the ribbon, click Deactivate.
D. 1. Configuring the Developer Dashboard
D. 1. 1. Enable the Developer Dashboard
- Open Sharepoint 2010 Management Shell.
- Type the following commands:
$svc=[Microsoft.Sharepoint.Administration.SPWebService] : : ContentService
$ddsetting=$svc.DeveloperDashboardSettings
$ddsetting.DisplayLevel=[Microsoft.Sharepoint.Administration.SPDeveloperDashboardLevel] : :OnDemand
$ddsetting.Update()
This script enables the Developer Dashboard an OnDemand mode.