SharePoint Development For Asp Net Developers

Uploaded on

Slides given for my talk about an introduction to SharePoint development at Oklahoma City Developer Group - December 2008.

Slides given for my talk about an introduction to SharePoint development at Oklahoma City Developer Group - December 2008.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • Demo building a user control, deployment, and a web part to load that control.Explain Safe Controls_ControlTemplates folder
  • Explain the manifest.xml and cab.ddf
  • Demo building a web part. TestWebPart (System.Web.UI.WebControls.WebParts.WebPart)Feature.xmlElements.xmlMyWebPart.webpart
  • Demo building a feature receiver.TestFeatureReceiver.cs
  • Demo the use of BDC Tools, the MetaData Model and the Import Process


  • 1. SharePoint Development for ASP.NET Developers
    Presenter: Corey Roth
    Enterprise Consultant
  • 2. Corey Roth
    Consultant for Stonebridge
    Worked in Consumer Electronics, Travel, Advertising, and Energy industries
    Currently doing MOSS development specializing in Enterprise Search and ECM
    OSU Graduate
    Microsoft Award for Customer Excellence (ACE) Winner
    Blog: (mirrored on
  • 3. SharePoint 3.0 or MOSS 2007?
    SharePoint 3.0 (WSS) is included with Windows Server
    MOSS extends the features of WSS
    MOSS requires a separate license
    MOSS includes Business Data Catalog (BDC), Enterprise Seach, Excel Services, My Sites, KPI dashboards, People Search, Forms Services, etc.
  • 4. Environment
    Virtualization – Windows Server, WSS or MOSS, and Visual Studio installed
    SharePoint on Remote Server – Requires remote debugging
    SharePoint on Vista – Works but not supported
  • 5. SharePoint Basics
    Farm – Represents the collection of servers of the SharePoint deployment
    Web Applications – Typically one or more of these maps to a web site in IIS (i.e.: Port 80)
    Site Collection (SPSite) – Will have at least one. Groups sites together
    Site (SPWeb) – Represents a site or subsite in a Site Collection. Contains pages, lists, etc.
    Feature – Allows code and SharePoint changes to occur at the click of a button
  • 6. What’s different about SharePoint development?
    Pages and Sites
    Must deploy DLLs to GAC or use Code Access Security if deploying to bin folder
    User controls must be hosted by a web part
  • 7. 12 Hive
    Location of most key SharePoint files: C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions12
  • 8. 12 Hive (Continued)
  • 9. 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
  • 10. 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)
  • 11. SharePoint API
    SPContext – Used to get reference to the current site or site collection
    All uses of SPSite or SPWeb must be disposed (use a using statement)
    Most collections do not have an “Exists” method
    Most objects require a call to .Update to save any changes made
    Some API calls require elevated security – Pass a delegate to RunWithElevatedPrivleges
  • 12. Demo
  • 13. 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 manfiest telling SharePoint how to deploy
  • 14. What the Solution Package does…
    Backs up your web.config
    Changes the trust element to WSS_Custom in web.config
    Backs up trust configuration file – wss_minimaltrust.config becomes wss_custom_wss_minimaltrust.config
    Changes the path to the trust configuration file in the web.config <trustLevel> element
    Adds code access security settings from manifest.xml
    More information on my blog
  • 15. Demo
  • 16. 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 can be found on my blog
  • 17. Demo
  • 18. Feature Receivers
    Feature Receivers allow you to execute code when a feature is Installed, Uninstalled, Activated, or Deactivated
    Create a class that inherits from SPFeatureReceiver
    Configured in Feature.xml
    SPFeatureProperties.Feature.Parent contains reference to SPWeb or SPSite object depending on scope of feature (must be cast)
  • 19. Demo
  • 20. References
    Dot Net Mafia Blog
    Office SharePoint Server SDK
    SharePoint Blogs
  • 21. Questions?
  • 22. Thanks
    Corey Roth