SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Deploying Code in SharePoint Presenter: Corey Roth Senior Consultant Stonebridge Blog: www.dotnetmafia.com
Corey Roth Consultant for Stonebridge Worked in Consumer Electronics, Travel, Advertising, and Energy industries Currently doing MOSS development specializing in Enterprise Search, Workflow, and ECM Microsoft Award for Customer Excellence (ACE) Winner E-mail: corey.roth@gmail.com Blog: www.dotnetmafia.com (mirrored on sharepointblogs.com)
Challenges for New Developers Learning the API Setting up the development environment Debugging
Deployment
12 Hive Location of most key SharePoint files:  C:rogram Filesommon Filesicrosoft sharedeb Server Extensions2
12 Hive (Continued)
Deploying Binaries – Two Options GAC Deployment – Not recommended unless absolutely necessary (i.e.: Event Recivers, Timer jobs, Workflows, etc). Requires application pool to be reset after every deployment. Allows code to execute with full trust Acceptable for new developers starting out because it is easier
Deploying Binaries – Two Options Bin Folder Deployment – Recommended but more complex Requires a developer to specify code access security settings or running SharePoint with full trust Does not require application pool to be reset Recommended approach but more complicated to implement
SafeControls SharePoint won’t execute a web part or user control unless it knows it is safe Declare an assembly and namespace safe in web.config SafeControls element Can be automated using a solution package (.wsp)
Deployment Options Manually copy binaries, feature files, pages, and controls to appropriate folders on SharePoint server Create a Feature – Would still have to manually copy files Create a Solution Package (.wsp) – A cab file that contains a manifest telling SharePoint how to deploy files and what features to install
Ghetto Deployment (Manual) Manually copy binaries to GAC or bin folder Manually upload .webpart files to web part gallery Manually copy user controls to CONTROLTEMPLATES folder Manually copy features files into FEATURES folder Manually copy anything else that you might need to deploy
Building and Deploying a Web Part Deploys similarly to a user control .webpart (or .dwp) file tells SharePoint where to find the web part’s code Use a feature to add the web part to the gallery Complete instructions at my blog http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/10/22/intro-to-sharepoint-development-how-to-build-and-deploy-a-web-part.aspx
Demo
Features A series of XML files that allow you to make changes to SharePoint Located in the TEMPLATEEATURES folder in the 12 hive Changes can include creating lists, pages, content types, site columns, and web parts. Can copy files into SharePoint’s virtual file repository but the template files still have to be deployed to the 12 hive first
Solution Packages (.wsp files) A cab file that can copy binaries, features, pages, and other files to SharePoint. Defined by manifest.xml and cab.ddf files Created with makecab.exe Can copy binaries to bin folder or GAC Can apply safe control and code access security settings Automatically installs features Can also be upgraded and retracted / deleted. Can be automated with VSeWSS, WSPBuilder, stsdev, etc.
cab.ddf Specifies which files to copy into the wsp file. You must specify each binary, page, XML or .webpart file you want to be copied in this file Syntax for each file is source <space> destination The destination specified is the location in the file not the location on the SharePoint server.
Manfiest.xml Specifies which features to activate and which files to copy into the 12 hive. Can deploy SiteTemplates Specifies SafeControl settings in web.config Configures Code Access Security (CAS) settings Paths are relative to the TEMPLATES folder in the 12 hive http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/09/04/more-on-manfiest-xml.aspx
Manfiest.xml Elements FeatureManifests – Specifies feautres to activate TemplateFiles – Required for any file that you want copied that is not a binary or feature file Assemblies – Required for each binary to be deployed  DeploymentTarget – WebAppplication or GlobalAssemblyCache SafeControls – Adds SafeControl entry to web.config CodeAccessSecurity – Applies CAS policies to assembly
Deploying your solution (.wsp) file Add the solution with stsadm stsadm –o addsolution –filename mysolution.wsp Deploy the solution with stsadm or Central Admin -> Solution Management stsadm –o deplysolution –name mysolution.wsp –immediate –allowGacDeployment –allowCasPolicies stsadm –o execadmsvcjobs -o upgradesolution – Upgrades an existing solution’s files -o retractsolution – Remove the solution from a given site(s) -o deletesolution – Removes the solution from the solution store
Building a User Control with Visual Studio Web Application Project Reference Microsoft.SharePoint.dll Must be registered as safe for SharePoint to execute Typically deployed to bin folder using Code Access Security Controls are typically deployed to the CONTROLTEMPLATES folder in the 12 hive. _ControlTemplates Virtual Directory Complete instructions are on my blog http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/11/18/introduction-to-sharepoint-development-deploy-a-user-control-in-sharepoint.aspx
Demo
Demo
References Dot Net Mafia Blog http://www.dotnetmafia.com Visual Studio Extensions for SharePoint (VSeWSS 1.3) CTP https://connect.microsoft.com/site/sitehome.aspx?SiteID=428 STSDev http://www.codeplex.com/stsdev SharePoint Blogs http://www.sharepointblogs.com WSPBuilder http://www.codeplex.com/wspbuilder
Questions?
Thanks Corey Roth coreyroth@gmail.com www.dotnetmafia.com

Weitere ähnliche Inhalte

Was ist angesagt?

Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best PracticesMostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
SharePoint Saturday NY
 
SPCSEA 2013 - Upgrading to SharePoint 2013
SPCSEA 2013 - Upgrading to SharePoint 2013SPCSEA 2013 - Upgrading to SharePoint 2013
SPCSEA 2013 - Upgrading to SharePoint 2013
Michael Noel
 
Greg Hurlman: Developing Custom Service Applications
Greg Hurlman: Developing Custom Service ApplicationsGreg Hurlman: Developing Custom Service Applications
Greg Hurlman: Developing Custom Service Applications
SharePoint Saturday NY
 
FrontFlow Release Version 12
FrontFlow Release Version 12FrontFlow Release Version 12
FrontFlow Release Version 12
tne
 

Was ist angesagt? (17)

SharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill DownSharePoint 2010 Upgrade Drill Down
SharePoint 2010 Upgrade Drill Down
 
Cognos Analytics Implementation Tips, Tricks & Gotchas
Cognos Analytics Implementation Tips, Tricks & GotchasCognos Analytics Implementation Tips, Tricks & Gotchas
Cognos Analytics Implementation Tips, Tricks & Gotchas
 
(ATS4-PLAT03) Balancing Security with access for Development
(ATS4-PLAT03) Balancing Security with access for Development(ATS4-PLAT03) Balancing Security with access for Development
(ATS4-PLAT03) Balancing Security with access for Development
 
SharePoint Upgrade (WSS 2.0 to WSS 3.0 and SPS 2003 to MOSS 2007) by Joel Ole...
SharePoint Upgrade (WSS 2.0 to WSS 3.0 and SPS 2003 to MOSS 2007) by Joel Ole...SharePoint Upgrade (WSS 2.0 to WSS 3.0 and SPS 2003 to MOSS 2007) by Joel Ole...
SharePoint Upgrade (WSS 2.0 to WSS 3.0 and SPS 2003 to MOSS 2007) by Joel Ole...
 
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best PracticesMostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
 
Office Web Apps Server 2013
Office Web Apps Server 2013Office Web Apps Server 2013
Office Web Apps Server 2013
 
SPCSEA 2013 - Upgrading to SharePoint 2013
SPCSEA 2013 - Upgrading to SharePoint 2013SPCSEA 2013 - Upgrading to SharePoint 2013
SPCSEA 2013 - Upgrading to SharePoint 2013
 
SharePoint Connections Coast to Coast Migrating SharePoint 2007 Solutions to ...
SharePoint Connections Coast to Coast Migrating SharePoint 2007 Solutions to ...SharePoint Connections Coast to Coast Migrating SharePoint 2007 Solutions to ...
SharePoint Connections Coast to Coast Migrating SharePoint 2007 Solutions to ...
 
Elements_Architecture_and_Technology.pdf
Elements_Architecture_and_Technology.pdfElements_Architecture_and_Technology.pdf
Elements_Architecture_and_Technology.pdf
 
Winter 15 : Salesforce
Winter 15 : SalesforceWinter 15 : Salesforce
Winter 15 : Salesforce
 
Greg Hurlman: Developing Custom Service Applications
Greg Hurlman: Developing Custom Service ApplicationsGreg Hurlman: Developing Custom Service Applications
Greg Hurlman: Developing Custom Service Applications
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
IIS 6.0 and asp.net
IIS 6.0 and asp.netIIS 6.0 and asp.net
IIS 6.0 and asp.net
 
Oracle e-business suite (ebs) r12.2.6 - new functionality
Oracle e-business suite (ebs)  r12.2.6 - new functionalityOracle e-business suite (ebs)  r12.2.6 - new functionality
Oracle e-business suite (ebs) r12.2.6 - new functionality
 
EVOLVE'14 | Enhance | Paul McMahon | AEM & Transactional Portal Systems
EVOLVE'14 | Enhance | Paul McMahon | AEM & Transactional Portal SystemsEVOLVE'14 | Enhance | Paul McMahon | AEM & Transactional Portal Systems
EVOLVE'14 | Enhance | Paul McMahon | AEM & Transactional Portal Systems
 
Cognos 11 installation step by step and notes
Cognos 11 installation step by step and notesCognos 11 installation step by step and notes
Cognos 11 installation step by step and notes
 
FrontFlow Release Version 12
FrontFlow Release Version 12FrontFlow Release Version 12
FrontFlow Release Version 12
 

Andere mochten auch (8)

Instant ECM with SharePoint 2010 - SPTechCon Boston 2011
Instant ECM with SharePoint 2010 - SPTechCon Boston 2011Instant ECM with SharePoint 2010 - SPTechCon Boston 2011
Instant ECM with SharePoint 2010 - SPTechCon Boston 2011
 
Let it Snow[1]
Let it Snow[1]Let it Snow[1]
Let it Snow[1]
 
Venetian Carnival Masks
Venetian Carnival MasksVenetian Carnival Masks
Venetian Carnival Masks
 
Pen and Ink
Pen and InkPen and Ink
Pen and Ink
 
SharePoint 2010 Development for ASP.NET Developers - Tyson Devcon 2010
SharePoint 2010 Development for ASP.NET Developers - Tyson Devcon 2010SharePoint 2010 Development for ASP.NET Developers - Tyson Devcon 2010
SharePoint 2010 Development for ASP.NET Developers - Tyson Devcon 2010
 
Sugar skulls[1]
Sugar skulls[1]Sugar skulls[1]
Sugar skulls[1]
 
Edible Art
Edible ArtEdible Art
Edible Art
 
BOE presentation
BOE presentationBOE presentation
BOE presentation
 

Ähnlich wie Deploying Code In SharePoint

Asp net mvc
Asp net mvcAsp net mvc
Asp net mvc
bgrynko
 
PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated Deployment
Michael Peacock
 

Ähnlich wie Deploying Code In SharePoint (20)

SharePoint Development For Asp Net Developers
SharePoint Development For Asp Net DevelopersSharePoint Development For Asp Net Developers
SharePoint Development For Asp Net Developers
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point Solutions
 
Migrating to SharePoint 2013 - Business and Technical Perspective
Migrating to SharePoint 2013 - Business and Technical PerspectiveMigrating to SharePoint 2013 - Business and Technical Perspective
Migrating to SharePoint 2013 - Business and Technical Perspective
 
Best practices for share point solution deployment
Best practices for share point solution deploymentBest practices for share point solution deployment
Best practices for share point solution deployment
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Asp net mvc
Asp net mvcAsp net mvc
Asp net mvc
 
SharePoint 2010 Tools in Visual Studio 2010
SharePoint 2010 Tools in Visual Studio 2010SharePoint 2010 Tools in Visual Studio 2010
SharePoint 2010 Tools in Visual Studio 2010
 
Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5
 
PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated Deployment
 
Automated Deployment
Automated DeploymentAutomated Deployment
Automated Deployment
 
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...Automating Your Enterprise Application Deployments With PowerShell by Geoff V...
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...
 
Automating Your Enterprise Application Deployments with PowerShell
Automating Your Enterprise Application Deployments with PowerShellAutomating Your Enterprise Application Deployments with PowerShell
Automating Your Enterprise Application Deployments with PowerShell
 
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
 
M365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionM365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx Version
 
SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Hous...
SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Hous...SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Hous...
SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Hous...
 
Team lab install_en
Team lab install_enTeam lab install_en
Team lab install_en
 
Share Point Web Parts 101
Share Point Web Parts 101Share Point Web Parts 101
Share Point Web Parts 101
 
How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?
 
Diff sand box and farm
Diff sand box and farmDiff sand box and farm
Diff sand box and farm
 
WebMatrix2
WebMatrix2WebMatrix2
WebMatrix2
 

Mehr von Corey Roth

Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
Corey Roth
 

Mehr von Corey Roth (20)

Introduction to Microsoft Teams and Office 365 Groups
Introduction to Microsoft Teams and Office 365 GroupsIntroduction to Microsoft Teams and Office 365 Groups
Introduction to Microsoft Teams and Office 365 Groups
 
Compliance and eDiscovery with Office 365
Compliance and eDiscovery with Office 365 Compliance and eDiscovery with Office 365
Compliance and eDiscovery with Office 365
 
Surfacing Your External Data using BCS in SharePoint 2013 - Dev Connections 2013
Surfacing Your External Data using BCS in SharePoint 2013 - Dev Connections 2013Surfacing Your External Data using BCS in SharePoint 2013 - Dev Connections 2013
Surfacing Your External Data using BCS in SharePoint 2013 - Dev Connections 2013
 
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
 
Configuring SharePoint Search for an Optimal Document Management Experience
Configuring SharePoint Search for an Optimal Document Management ExperienceConfiguring SharePoint Search for an Optimal Document Management Experience
Configuring SharePoint Search for an Optimal Document Management Experience
 
Fives ways to query SharePoint 2013 Search - SharePoint Summit Toronto 2013
Fives ways to query SharePoint 2013 Search - SharePoint Summit Toronto 2013Fives ways to query SharePoint 2013 Search - SharePoint Summit Toronto 2013
Fives ways to query SharePoint 2013 Search - SharePoint Summit Toronto 2013
 
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
 
What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...
What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...
What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...
 
Office 365 - Introduction to SharePoint Online Development - Lync and Learn
Office 365 - Introduction to SharePoint Online Development - Lync and LearnOffice 365 - Introduction to SharePoint Online Development - Lync and Learn
Office 365 - Introduction to SharePoint Online Development - Lync and Learn
 
New SharePoint development features using Visual Studio 2012 - SharePoint Sat...
New SharePoint development features using Visual Studio 2012 - SharePoint Sat...New SharePoint development features using Visual Studio 2012 - SharePoint Sat...
New SharePoint development features using Visual Studio 2012 - SharePoint Sat...
 
Pitching Office 365 to your Energy Customers - Microsoft Worldwide Partner Co...
Pitching Office 365 to your Energy Customers - Microsoft Worldwide Partner Co...Pitching Office 365 to your Energy Customers - Microsoft Worldwide Partner Co...
Pitching Office 365 to your Energy Customers - Microsoft Worldwide Partner Co...
 
Making the Most of Search in SharePoint Online - TechEd North America
Making the Most of Search in SharePoint Online - TechEd North AmericaMaking the Most of Search in SharePoint Online - TechEd North America
Making the Most of Search in SharePoint Online - TechEd North America
 
New SharePoint development features using Visual Studio 11 - San Antonio Shar...
New SharePoint development features using Visual Studio 11 - San Antonio Shar...New SharePoint development features using Visual Studio 11 - San Antonio Shar...
New SharePoint development features using Visual Studio 11 - San Antonio Shar...
 
Office 365 - Introduction to SharePoint Online Development - SharePoint Satur...
Office 365 - Introduction to SharePoint Online Development - SharePoint Satur...Office 365 - Introduction to SharePoint Online Development - SharePoint Satur...
Office 365 - Introduction to SharePoint Online Development - SharePoint Satur...
 
Extending SharePoint 2010 to your customers and partners
Extending SharePoint 2010 to your customers and partnersExtending SharePoint 2010 to your customers and partners
Extending SharePoint 2010 to your customers and partners
 
Advanced BCS - Business Data Connectivity Models and Custom Connectors - SPTe...
Advanced BCS - Business Data Connectivity Models and Custom Connectors - SPTe...Advanced BCS - Business Data Connectivity Models and Custom Connectors - SPTe...
Advanced BCS - Business Data Connectivity Models and Custom Connectors - SPTe...
 
Getting the most ouf of SharePoint Search - Tulsa SharePoint Interest Group
Getting the most ouf of SharePoint Search - Tulsa SharePoint Interest GroupGetting the most ouf of SharePoint Search - Tulsa SharePoint Interest Group
Getting the most ouf of SharePoint Search - Tulsa SharePoint Interest Group
 
Instant ECM with SharePoint 2010
Instant ECM with SharePoint 2010Instant ECM with SharePoint 2010
Instant ECM with SharePoint 2010
 
Advanced BCS - Business Data Connectivity Models and Custom Connectors
Advanced BCS - Business Data Connectivity Models and Custom ConnectorsAdvanced BCS - Business Data Connectivity Models and Custom Connectors
Advanced BCS - Business Data Connectivity Models and Custom Connectors
 
Introduction to SharePoint 2010 Enterprise Search - NWA TechFest 2010
Introduction to SharePoint 2010 Enterprise Search - NWA TechFest 2010Introduction to SharePoint 2010 Enterprise Search - NWA TechFest 2010
Introduction to SharePoint 2010 Enterprise Search - NWA TechFest 2010
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Deploying Code In SharePoint

  • 1. Deploying Code in SharePoint Presenter: Corey Roth Senior Consultant Stonebridge Blog: www.dotnetmafia.com
  • 2. Corey Roth Consultant for Stonebridge Worked in Consumer Electronics, Travel, Advertising, and Energy industries Currently doing MOSS development specializing in Enterprise Search, Workflow, and ECM Microsoft Award for Customer Excellence (ACE) Winner E-mail: corey.roth@gmail.com Blog: www.dotnetmafia.com (mirrored on sharepointblogs.com)
  • 3. Challenges for New Developers Learning the API Setting up the development environment Debugging
  • 5. 12 Hive Location of most key SharePoint files: C:rogram Filesommon Filesicrosoft sharedeb Server Extensions2
  • 7. Deploying Binaries – Two Options GAC Deployment – Not recommended unless absolutely necessary (i.e.: Event Recivers, Timer jobs, Workflows, etc). Requires application pool to be reset after every deployment. Allows code to execute with full trust Acceptable for new developers starting out because it is easier
  • 8. Deploying Binaries – Two Options Bin Folder Deployment – Recommended but more complex Requires a developer to specify code access security settings or running SharePoint with full trust Does not require application pool to be reset Recommended approach but more complicated to implement
  • 9. SafeControls SharePoint won’t execute a web part or user control unless it knows it is safe Declare an assembly and namespace safe in web.config SafeControls element Can be automated using a solution package (.wsp)
  • 10. Deployment Options Manually copy binaries, feature files, pages, and controls to appropriate folders on SharePoint server Create a Feature – Would still have to manually copy files Create a Solution Package (.wsp) – A cab file that contains a manifest telling SharePoint how to deploy files and what features to install
  • 11. Ghetto Deployment (Manual) Manually copy binaries to GAC or bin folder Manually upload .webpart files to web part gallery Manually copy user controls to CONTROLTEMPLATES folder Manually copy features files into FEATURES folder Manually copy anything else that you might need to deploy
  • 12. Building and Deploying a Web Part Deploys similarly to a user control .webpart (or .dwp) file tells SharePoint where to find the web part’s code Use a feature to add the web part to the gallery Complete instructions at my blog http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/10/22/intro-to-sharepoint-development-how-to-build-and-deploy-a-web-part.aspx
  • 13. Demo
  • 14. Features A series of XML files that allow you to make changes to SharePoint Located in the TEMPLATEEATURES folder in the 12 hive Changes can include creating lists, pages, content types, site columns, and web parts. Can copy files into SharePoint’s virtual file repository but the template files still have to be deployed to the 12 hive first
  • 15. Solution Packages (.wsp files) A cab file that can copy binaries, features, pages, and other files to SharePoint. Defined by manifest.xml and cab.ddf files Created with makecab.exe Can copy binaries to bin folder or GAC Can apply safe control and code access security settings Automatically installs features Can also be upgraded and retracted / deleted. Can be automated with VSeWSS, WSPBuilder, stsdev, etc.
  • 16. cab.ddf Specifies which files to copy into the wsp file. You must specify each binary, page, XML or .webpart file you want to be copied in this file Syntax for each file is source <space> destination The destination specified is the location in the file not the location on the SharePoint server.
  • 17. Manfiest.xml Specifies which features to activate and which files to copy into the 12 hive. Can deploy SiteTemplates Specifies SafeControl settings in web.config Configures Code Access Security (CAS) settings Paths are relative to the TEMPLATES folder in the 12 hive http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/09/04/more-on-manfiest-xml.aspx
  • 18. Manfiest.xml Elements FeatureManifests – Specifies feautres to activate TemplateFiles – Required for any file that you want copied that is not a binary or feature file Assemblies – Required for each binary to be deployed DeploymentTarget – WebAppplication or GlobalAssemblyCache SafeControls – Adds SafeControl entry to web.config CodeAccessSecurity – Applies CAS policies to assembly
  • 19. Deploying your solution (.wsp) file Add the solution with stsadm stsadm –o addsolution –filename mysolution.wsp Deploy the solution with stsadm or Central Admin -> Solution Management stsadm –o deplysolution –name mysolution.wsp –immediate –allowGacDeployment –allowCasPolicies stsadm –o execadmsvcjobs -o upgradesolution – Upgrades an existing solution’s files -o retractsolution – Remove the solution from a given site(s) -o deletesolution – Removes the solution from the solution store
  • 20. Building a User Control with Visual Studio Web Application Project Reference Microsoft.SharePoint.dll Must be registered as safe for SharePoint to execute Typically deployed to bin folder using Code Access Security Controls are typically deployed to the CONTROLTEMPLATES folder in the 12 hive. _ControlTemplates Virtual Directory Complete instructions are on my blog http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/11/18/introduction-to-sharepoint-development-deploy-a-user-control-in-sharepoint.aspx
  • 21. Demo
  • 22. Demo
  • 23. References Dot Net Mafia Blog http://www.dotnetmafia.com Visual Studio Extensions for SharePoint (VSeWSS 1.3) CTP https://connect.microsoft.com/site/sitehome.aspx?SiteID=428 STSDev http://www.codeplex.com/stsdev SharePoint Blogs http://www.sharepointblogs.com WSPBuilder http://www.codeplex.com/wspbuilder
  • 25. Thanks Corey Roth coreyroth@gmail.com www.dotnetmafia.com

Hinweis der Redaktion

  1. Demo manual deployment. Copy a binary out with a web part and manually copy DLL to the GAC.Demo how to export an existing .webpart definition to build from.
  2. Explain the manifest.xml and cab.ddf
  3. VSeWSS
  4. Demo the use of BDC Tools, the MetaData Model and the Import Process