SharePoint 2010 Training Session 3
-
Upload
usman-zafar-malik -
Category
Technology
-
view
659 -
download
2
Transcript of SharePoint 2010 Training Session 3
![Page 1: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/1.jpg)
SharePoint 2010
By: Usman Zafar Malik
[MCTS: MOSS 2007], [MSCBSS: CRM 3.0 / 4.0], MCP
Session - 3
![Page 2: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/2.jpg)
SharePoint 2010 Deployment
![Page 3: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/3.jpg)
Agenda
• What to Deploy?
• Types of Solution Packages
• Deployment Cases
• Deployment Steps
• Deployment Approaches
![Page 4: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/4.jpg)
What to Deploy ?
![Page 5: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/5.jpg)
Solution Package• What is a solution package?
– A solution package is a distribution package that delivers your custom SharePoint Server 2010 development work to the Web servers or the application servers in your server farm.
– Use solutions to package and deploy custom Features, site definitions, templates, layout pages, Web Parts, cascading style sheets, and assemblies.
![Page 6: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/6.jpg)
Type of Solutions
1- Sandboxed Solutions
2- Farm Solutions
![Page 7: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/7.jpg)
Sandboxed Solutions• Allowing site collection administrators to deploy solutions that are safe to run.
• Deploying Solutions at Site Collection Level.
• Some of the Limitations are
– Can’t support visual web parts, because it contains a .ascx control that must be deployed to the “_layouts” directory and deploying controls isn't allowed in any directory in sandboxed solutions.
– Upload the solution package to the Solution Gallery and activate it.
– For Debugging sandbox solutions, attach the debugger to the sandboxed solution worker process, SPUCWorkerProcess.exe and debug it.
![Page 8: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/8.jpg)
Sandboxed Solutions
![Page 9: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/9.jpg)
Farm Solutions• They're deployed by a farm administrator and are scoped
to the farm level.
• Also known as full trust solutions.
• They have full trust access to all resources and functionality in SharePoint and, when deployed, require you to IISReset.
• Solution should deployed on both WFE’s and Application Servers.
![Page 10: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/10.jpg)
Farm Solutions
![Page 11: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/11.jpg)
Deployment Items
• Visual Web parts
• Master Pages
• Content Types
• List Definitions
• Page Layouts
• User Controls
• Web Controls
• Site Definitions
![Page 12: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/12.jpg)
Visual Web Parts
![Page 13: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/13.jpg)
Visual Web Parts
![Page 14: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/14.jpg)
Master Pages
![Page 15: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/15.jpg)
Master Pages
![Page 16: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/16.jpg)
Master Pages
![Page 17: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/17.jpg)
User Controls
![Page 18: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/18.jpg)
User Controls
![Page 19: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/19.jpg)
Physical Item in 14 Hive
![Page 20: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/20.jpg)
Deployment Cases
• Fresh Deployment
• Upgrade Deployment
• Uninstall Deployment
![Page 21: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/21.jpg)
Deployment StepsFresh Deployment
1. Adding Solution (*.wsp file)
Just add this solution to the SharePoint solution gallery (Site Collection/Farm Level)
2. Deploying Solution (*.wsp file)
Placed all the files present in the solution package will be deployed to their respective places. User control files (.ascx) are copied to “%ProgramFiles%\Common Files\Microsoft Shared\web server
extensions\14\TEMPLATE\ControlTemplates” or a subfolder of it. Assemblies are deployed to the global assembly cache or to a web application's \bin folder Features are copied to a subfolder of “%ProgramFiles%\Common Files\Microsoft Shared\web server
extensions\14\TEMPLATE\FEATURES” and installed in the Feature Gallery of the farm, web application, site collection, or website, depending on the scope of the Feature
3. Activation the Features
Activate the Features as required Features must be activated before they can be used.
![Page 22: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/22.jpg)
Deployment Steps
Upgrade Deployment
Deploy Solution v/s Upgrade Solution Concept
• Upgrade Solution If you rename the solution file or change the GUID, "upgradesolution" operation will fail with an error stating that a solution with name or GUID does not exists in solution store. But in case of “deploy solution” it will allow you to rename it.
• Deploy Solution When you deploy a solution and then their associated features are also installed but that's not the case with "upgradesolution" operation. If you uninstall the features and then upgrade the solution, it will not install the features. But if you deploy the solution it will install the features again.
![Page 23: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/23.jpg)
Deployment StepsUpgrade Deployment (Deploy Solution Technique)
1. Disable and Uninstall all the Features
For the safe side you need to deactivate/disable the feature and then uninstall it .
2. Retracting Solution (*.wsp file)
Retracted solutions are not removed from the farm's solution store and can remain stored there in an un-deployed state indefinitely. It will uninstall all the features which exists in the solution package.
3. Deleting Solution
Deleting the existing solution.
3. Adding Solution
Adding the updated solution in to the SharePoint solution store.
3. Deploying Solution
Deploying the newly added solution/package file. Will automatically installing the features and placed the files in to their respective places.
3. Activating Features
Activate the newly installed features as required.
![Page 24: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/24.jpg)
Deployment Steps
Upgrade Deployment (Upgrade Solution Technique)
1. Upgrade Solution Package
Just performs upgrade operations on the Solution/Package file.
![Page 25: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/25.jpg)
Deployment StepsUpinstall Deployment
1. Disable and Uninstall all the Features
You must first need to deactivate/disable all the features and then uninstall it.
2. Retracting Solution (*.wsp file)
Retracted solutions are not removed from the farm's solution store and can remain stored there in an un-deployed state indefinitely.
It will uninstall all the features which exists in the solution package.
3. Deleting Solution
Deleting the existing solution.
![Page 26: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/26.jpg)
Deployment Approaches
• Two types of Deployment Approaches.
Use STSADM Command Line Tool
Use Power Shell Commands
![Page 27: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/27.jpg)
STSADM Command Line Tool
• An .exe file “Stsadm.exe” resides in 14 hive Bin folder.
Path: C:\ProgramFiles\CommonFiles\Microsoft Shared\web server extensions\14\BIN\stsadm.exe
![Page 28: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/28.jpg)
STSADM Command Line ToolAdding Solution
stsadm.exe -o addsolution -filename "DummySharePointProject.wsp”* Perform Administrative Command
Deploying Solutionstsadm.exe -o deploysolution -name "DummySharePointProject.wsp" -allowGacDeployment -immediate –force
* Perform Administrative Command
stsadm.exe -o deploysolution -name "DummySharePointProject.wsp" -allowGacDeployment -immediate -force –allcontenturls* Perform Administrative Command
Note: * Always perform this command after every command that need to run the administrative job.* stsadm.exe -o execadmsvcjobs
![Page 29: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/29.jpg)
STSADM Command Line ToolRetracting Solution
stsadm.exe -o retractsolution -name "DummySharePointProject.wsp" -immediate* Perform Administrative Command
stsadm.exe -o retractsolution -name "DummySharePointProject.wsp" -allcontenturls -immediate* Perform Administrative Command
Deleting Solution
stsadm.exe -o deletesolution -name "DummySharePointProject.wsp"* Perform Administrative Command
Note: * Always perform this command after every command that need to run the administrative job.* stsadm.exe -o execadmsvcjobs
![Page 30: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/30.jpg)
STSADM Command Line ToolInstalling Feature
stsadm.exe -o installfeature -name [Feature Name] -force
Uninstall Feature
stsadm.exe -o uninstallfeature -id [Feature ID] -force
* [Feature Name] = Example: “Feature.ContentTypes"
* [Feature ID] = Example: 4c9e8ca5-d893-42b8-a3b3-cae4b18bf133
![Page 31: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/31.jpg)
STSADM Command Line ToolDeactivate/Disable Feature
stsadm.exe -o deactivatefeature -id [Feature ID] -url [TargetUrl] –force
Activate/Enable Feature
stsadm.exe -o activatefeature -id [Feature ID] -url [TargetUrl] -force
* [Feature ID] = Example: 4c9e8ca5-d893-42b8-a3b3-cae4b18bf133
* [TargetUrl] = provide the site URL from where feature is going to disabled.
http://mydummysiteserver:port/testsite
![Page 32: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/32.jpg)
Power Shell Commands
Most Power full deployment tool
Have large number of command supports (Getter/Setter) available for commands
Can code normal C# code inside power shell script
Can execute our multiple commands through scripting logic
![Page 33: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/33.jpg)
Power Shell CommandsAdding Solution
$SolutionPath = “C:\DummySharePointProject.wsp”
Add-SPSolution $SolutionPath
Deploying Solution
$solutionName = "DummySharePointProject.wsp“
$SiteUrl = “http://mydummyweburl:9999/”
Install-SPSolution -Identity $solutionName -WebApplication $SiteUrl -GACDeployment
![Page 34: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/34.jpg)
Power Shell CommandsRetracting Solution
$solutionName = "DummySharePointProject.wsp“$SiteUrl = “http://mydummyweburl:9999/”
Uninstall-SPSolution -Identity $solutionName -WebApplication $SiteUrl -Confirm:$false
Deleting Solution
$solutionName = "DummySharePointProject.wsp“
Remove-SPSolution -Identity $solutionName -Confirm:$false
![Page 35: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/35.jpg)
Power Shell Commands
Installing Feature
Install-SPFeature [FeatureFolderName]
Uninstall Feature
Uninstall-SPFeature [FeatureFolderName ]
![Page 36: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/36.jpg)
Power Shell Commands
Deactivate/Disable Feature
Disable-SPFeature [FeatureFolderName] -Url [http://server/site/subsite]
Activate/Enable Feature
Enable-SPFeature [FeatureFolderName] -Url [http://server/site/subsite]
![Page 37: SharePoint 2010 Training Session 3](https://reader034.fdocuments.us/reader034/viewer/2022042700/559ac2811a28ab84378b474a/html5/thumbnails/37.jpg)
Thanks !