Managing Sharepoint Customizations

  • Administering Features and Solutions
  • Administering Sandboxed Solutions
  • Administering the Developer Dashboard

A. Administering Features and Solutions
A. 1. Administering Features
  1. Log on to SP2010-WFE1 as CONTOSO\SP_Admin, with its password.
  2. Open Windows Internet Explorer.
  3. In the address bar, type http://intranet.contoso.com, and then press ENTER.
  4. Click Site Actions, and then click View All Site Content.
  5. Click Create.  The Create page appears.
  6. Observer that  a calendar or contact list are not shown as available options.
  7. Close the Create page.
  8. Click Site Actions, and then click Site Settings.
  9. In the Site Actions section, click Manage site features.
  10. In the Team Collaboration Lists row, click Activate
  11. Click Site Actions, and then click View All Site Content.
  12. Click Create. The Create page appears.
  13. Observer that you can now create a calendar or contact list.
  14. Close the Create page.
A. 2. Install a custom feature
  1. Right-click the CustomAction folder, and then click Copy.
  2. 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.
  3. Press CTRL+V to pase the CustomAction folder into the Features folder.
  4. Close the Features folder window.
  5. 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.
  6. Click Yes.
  7. 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

  1.  Switch to IE.
  2. Click Site Actions, and then click Site Settings.
  3. In the Site Actions section, click Manage site features.
  4. In the JavaScript Dropdown item row, click Activate.
  5. Click Site Actions, and then click A Custom Action. A Message from webpage window appears with the message. Hello World.
  6. Click OK.
  A. 4. Deactivate a feature
  1.  Click Site Actions, and then click Site Settings.
  2. In the Site Actions section, click Manage site features.
  3. In the JavaScript Dropdown item row, click Deactivate. A warning page appears.
  4. Click Deactivate this feature.
  5. Click Site Actins, then observer that A Custom Action no longer appears, and then press ESC to close the menu.
B. Administering Solutions
B. 1. Install a solution

  1.  Switch to Sharepoint 2010 Management Shell.
  2. Type the following commands:
    stsadm -o addsolution -filename "d:\labfiles\ApplicationTemplateCore.wsp"
    stsadm -o addsolution -filename "d:\labfiles\BugDatabase.wsp"
  3. Close Sharepoint 2010 Management Shell
  4. Open Sharepoint 2010 Central Administration. The User Account Control dialog box appears.
  5. Click Yes.
  6. In the Quick Launch, click System Settings.
  7. In the Farm Management section, click Manage farm solutions.
  8. Observe that the two solutions are installed, but are not deployed.
 B. 2. Deploy a solution
  1.  Click applicationtemplatecore.wsp
  2. Click Deploy Solution
  3. Review the settings, and then click OK
  4. Click Bugdatabase.wsp
  5. Click Deploy Solution
  6. Review the settings and then click OK.
 B. 3. Confirm the deployment of a solution
  1.  In the address bar, type http://intranet.contoso.com/sites/IT, and then press ENTER.
  2. Click Site Actions, and then click New Site.
  3. In the left navigation, click the Application Templates tab, and then click Bug Database.
  4. In the Ttitle box, type Bug Tracking.
  5. In the URL name box, type Bugs.
  6. Click Create. A new bug database Web is created in the IT site collection.
  7. In the address bar, type http://intranet.contoso.com/sites/IT/Bugs, and then press ENTER.
  8. Close all windows.
 C. Administering Sandboxed Solutions

 C. 1.Administering Sandboxed Solutions
C. 1. 1. Ensure that the code service is running

  1.  Click Start, then click Administrative Tools, and then click Services.
  2. Right-click Sharepoint 2010 User Code Host, and then click Properties.
  3. Verify that the service is not started, and that the Startup type is Disabled
  4. Click OK.
  5. Open Sharepoint 2010 Central Administration. The User Account Control dialog box appears.
  6. Click Yes.
  7. In the Quick Launch, click System Settings.
  8. Click Manage services on server.
  9. In the Microsoft Sharepoint Foundation Sandboxed Code Service row, click Start. The Service status changes to Started.
  10. Switch to the Services console.
  11. Right click Sharepoint 2010 User Code Host, and then click Properties.
  12. Verify that the service is started, and that the Startup type is Automatic.
  13. Click OK.
  14. Close the Services console.
C. 1. 2. Upload a sandboxed solution

  1. Switch to IE.
  2. In the address bar, type http://intranet.contoso.com/sites/IT, and then press ENTER.
  3. Click Site Actions, and then click Site Settings.
  4. In the Galleries section, click Solutions.
  5. On the  ribbon, click the Solutions tab, and then click Upload Solution.
  6. Click Browse.
  7. Select D:\files\badreceiver.wsp.
  8. Click Open.
  9. Click OK.
  10. On the ribbon, click Activate. The Badreceiver solution is displayed with a status of Activated.
  11. Click Site Actions, and then click Site Settings.
  12. In the Site Actions section, click Manage site features.
  13. In the Badreceiver feature1 row, click Activate
 C. 1. 3. Test  a sandboxed solution
  1.  In the Quick Launch, click All Site Content.
  2. Click Announcements
  3. On the ribbon, click the Items tab.
  4. Click New Item.
  5. In the Title box, type My Announcement.
  6. Click Save. An error message appears.
  7. Click Go back to site.
  8. Click Site Actions, and then click Site Settings.
  9. In the Galleries section, click Solutions.
 C. 2. Modifying Sandboxed Solutions Timer Jobs
 C. 2. 1. Run sandboxed solution timer jobs
  1.  Open Sharepoint 2010 Central Administration. The User Account Control dialog box appears.
  2. Click Yes.
  3. In the Quick Launch, click Monitoring.
  4. In the Timer Jobs section, click Review Job definitions.
  5. Locate the Solution Resource Usage Update timer job for Sharepoint - intranet.contoso.com80.
  6. Click Solution Resrouce Usage Update in the Sharepoint - intranet.contoso.com80 row.
  7. Click Run Now.
  8. Click Solution Resource Usage Log Processing in the Sharepoint - intranet.contoso.com80 row.
  9. Click Run Now.
 C. 2. 2. Monitor resource usage
  1.  Switch to the instance of Internet Explorer that is displaying the Solutions Gallery.
  2. Press F5 to refresh the page.

 C. 3. Configuring Sandbox Points
  C. 3. 1. Review default resource measures
  1.  Run Sharepoint 2010 Management Shell as administrator. The User Account Control dialog box appears.
  2. Click Yes.
  3. 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
  4. Open the file C:\ResourceMeasures.txt. This file contains a listing of the resource measures that are monitored for sandboxed solutions.
  5. To find the section for database queries, press CTRL+F, then type SharepointDatabaseQueryCount, and then press ENTER.
  6. Record the content values of ResourcesPerPoint and AbsoluteLimit.
  7. Close the file.
   C. 3. 2. Change default resource measure points
  1.  Switch to Administrator: Sharepoint 2010 Management Shell.
  2. 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.
  3. Type the following command
    iisreset
    IIS restarts and enables the new resource settings.
  4. Close Administrator: Sharepoint 2001 Management Shell.
    C. 3. 3. Test modified sandboxed resource measures
  1.  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.
  2. In the Quick Launch, click All Site Content
  3. Click Announcements
  4. On the ribbon, click items
  5. Click New item
  6. In the Title box, type My Next Announcement.
  7. Click Save. An error message appears.
  8. Click Go back to site.
  9. Click Site Actions, and then click Site Settings.
  10. In the Galleries section, click Solutions.
  11. Repeat part C.2.1 to run the sandboxed solutions timer jobs.
  12. Switch to the instance of Internet Explorer that displays the Solutions gallery for the IT intranet Web
  13. Press F5 to refresh the page.
  14. Observe that the resource usage of the solution is increasing more rapidly.
 C. 3. 4. Deactive the bad solution
  1.  Click Site Actions, then Site Settings.
  2. In the Galleries section, click Solutions
  3. Click the Bad Receiver row.
  4. On the ribbon, click Deactivate. The Solution Gallery - Deactivate Solution page opens.
  5. On the ribbon, click Deactivate.
D. Administering the Developer Dashboard
D. 1. Configuring the Developer Dashboard
D. 1. 1. Enable the Developer Dashboard
  1.  Open Sharepoint 2010 Management Shell.
  2. 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.
D. 1. 2. Review the Developer Dashboard