SPRibbon Hide in Sharepoint Modal Popup C#

If want to Hide The sharepoint Ribbon for the Modal Popups, below will be helpfull Programatically on Page Load,

SPRibbon current = SPRibbon.GetCurrent(this.Page);

current.CommandUIVisible = false;

Advertisements

how to get current URL in SharePoint?

To get current URL using SPContext.Current try to use below
SPContext.Current.Web.Url for absolute url
SPContext.Current.ServerRelativeUrl for the relative position of web on site
SPContext.Current.ListItemServerRelativeUrl
OR
string SiteUrl = SPContext.Current.Site.Url;//Get the url of current site
SPSite site = new SPSite(SiteUrl);//open the site with the url passed
SPWeb oWeb = site.OpenWeb();//open the web
AND
Get current page absolute url
Page.Request.RawUrl

Sharepoint 2010 – Custom Error Pages

Unless you love the default Sharepoint error pages for 404 (not found) and 401 (access denied), it is usually a good idea to change them. The steps are a bit different than a standard ASP.net application.

1) Browse to C:\inetpub\custerr\

2) You should now see a list of localization folders like en-US or fr-FR. Open the folder you want to edit and modify the error pages for 401,403,404 and 500.

3) Now browse to C:\inetpub\wwwroot\wss\VirtualDirectories\ and open the folder associated to the Sharepoint site you would like to affect.

4) Edit the file web.config and find the keyword customErrors. Replace the complete customErrors code block with:

1.<customErrors defaultRedirect="404.htm" mode="On">

2.       <error redirect=“401.htm” statusCode=“401” />

3.       <error redirect="403.htm" statusCode="403" />

4.       <error redirect=“404.htm” statusCode=“404” />

5.       <error redirect="500.htm" statusCode="500" />

6.</customErrors>

5) Now find the keyword <system.webServer>. Inside this block, place the following block code. (If the httpErrors block already exists, replace it completely!)

1.<httpErrors errorMode=“Custom” existingResponse=“Auto”>

2.</httpErrors>

6) Save web.config and do the usual iisreset command if needed.

 

Installing SharePoint 2010 in Windows 7 (64 bit)

Many people faces problem in installing SharePoint 2010 Server in windows 7 because it doesn’t directly support it and you will get error about operation system while attempting to install. But there are certain steps which can guide you to install SharePoint 2010 in your machine. I hope you know how to install SharePoint 2007 in windows 7. Don’t afraid, it is not the prerequisites for the installation of SharePoint 2010. However, if you need it you can see it here. But that tweaks doesn’t work for 2010. So you must follow some steps to run SharePoint 2010 in your Windows 7 (64 bit) machine.

1)      Install the following update.

2)      Extract the installation files from the setup using command d:\Software\SharePoint10\SharePointServer /extract:d\SharePointServerFiles. In my case source directory is d:\Software\SharePoint10 and target directory is d:\ SharePointServerFiles.

3)      In the target directory find the config.xml a following d:\ SharePointServerFiles \files\Setup\ and add the following line of text in configuration node <Setting Id=”AllowWindowsClientInstall” Value=”True”/>. Now your configuration file would be something like below:

01 <Configuration>
02     <Package Id="sts">
03         <Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes"/>
04     </Package>
05     <DATADIR Value="%CommonProgramFiles%\Microsoft Shared\Web ServerExtensions\14\Data" />
06     <Package Id="spswfe">
07         <Setting Id="SETUPCALLED" Value="1"/>
08     </Package>
09   
10     <Logging Type="verbose" Path="%temp%" Template="SharePoint Server Setup(*).log"/>
11     <!--<PIDKEY Value="Enter Product Key Here" />-->
12     <Setting Id="SERVERROLE" Value="SINGLESERVER"/>
13     <Setting Id="USINGUIINSTALLMODE" Value="1"/>
14     <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL"/>
15     <Setting Id="SETUP_REBOOT" Value="Never"/>
16     <Setting Id="AllowWindowsClientInstall" Value="True"/>
17 </Configuration>

4)      Now, it is the time to install the prerequisite installer files.  First install filter pack in the path d:\ SharePointServerFiles \PrerequisiteInstallerFiles\FilterPack\ FilterPack.msi.  Now install following components:

  1. Microsoft Sync Framework
  2. SQL Server Native Client
  3. Windows Identity Foundation (Windows6.1-KB974405-x64.msu)

If you have Visual Studio 2010 installed in your machine then you may not have to install previous two components.

5)      Now, turn on the windows features for IIS for the components as shown in figure (AT LEAST, please). Type ‘optionalfeatures’ in run and enter to open windows features.

Fig continue:

6)      Now run setup.exe from ‘d:\ SharePointServerFiles’ to get installation wizard and choose Standalone installation to install all on one developer workstation.

7)      After the end of installation you need to run the configuration wizard. But before that you need to install some hotfix for SQL Server. Install SQL Server 2008 KB 970315 x64. You need to request the hotfix and Microsoft will send you in email the link and password that required for extraction. Note that you must install this hotfix to avoid the exception while configuration wizard is creating configuration database.

8)      Now, you can run your configuration wizard to configure SharePoint in your machine. Don’t panic; it takes time. Good luck.

Issues

1. I can open the Central Administrator site but links are not enabled in Central Administration -> Application Management -> Manage Web Applications. You cannot create new web application and extend existing oneL.

Sol: Make sure you have Windows Identity Foundation installed. Get it from here.  Now do not directly open the central admin site but first open Internet Explorer as administrator and open central admin page. Now, if still it is not working, you would like to use 64-bit IE (Same happened in my case). Furthermore, you can disable UAC to enable link but it is not good practice to disable UAC just for SharePoint.

NOTE: If you have any issue, feel free to post it.

Setting Up the Development Environment for SharePoint 2010 on Windows Vista, Windows 7, and Windows Server 2008

SharePoint 2010
 

Published: May 2010

When you create or customize SharePoint solutions, it is usually best to develop the solution on a local computer where Microsoft SharePoint Server 2010 or Microsoft SharePoint Foundation 2010 is installed. This article describes how to install a development environment with Microsoft SharePoint 2010 and Microsoft Visual Studio 2010. The development environment that you create by using these instructions will not support SharePoint farm installations, and you should not host active production sites with this configuration. These instructions enable you to get started with an environment that is specifically suited to developing SharePoint custom solutions.

NoteNote
For a Windows PowerShell script that installs and configures all of the prerequisites and products that you will need to get started with SharePoint Server 2010 development, see SharePoint 2010 Easy Setup Script.

The requirements for a development environment are less stringent and costly than the requirements for a production environment, and the guidelines in this topic do not support a production environment installation. You have several options for preconfiguring the operating system of a local computer on which you will install SharePoint 2010 for development purposes. The choice that you make will be determined by factors specific to your organization and environment (such as budget, the size of your development team, and the operating systems that you and your organization are already using).

In any development environment, you should use a computer with an x64-capable CPU, and at least 2 gigabytes (GB) of RAM to install and run SharePoint Foundation; 4 GB of RAM is preferable. You should use a computer with 4 GB of RAM to install and run SharePoint Server; 6 GB to 8 GB of RAM is preferable.

Following are the options:

  • Install SharePoint on Windows Server 2008 Service Pack 2 x64 (or Windows Server 2008 R2 x64).
  • Use Microsoft Hyper-V and install SharePoint on a virtual machine running a Windows Server 2008 Service Pack 2 x64 (or Windows Server 2008 R2 x64) guest operating system.
  • Install SharePoint on Windows 7 x64, Windows Vista Service Pack 1 x64, or Windows Vista Service Pack 2 x64.
  • Use Microsoft Hyper-V and install SharePoint on a virtual machine running a Windows 7 x64, Windows Vista Service Pack 1 x64, or Windows Vista Service Pack 2 x64 guest operating system.

You must install the WCF Hotfix for Microsoft Windows. The hotfix is available for Windows Server 2008 Service Pack 2, Windows Vista Service Pack 1, and Windows Vista Service Pack 2 and for Windows Server 2008 R2 and Windows 7.

If you are using Windows Vista Service Pack 1 or Windows Vista Service Pack 2, install the hotfix for ASP.NET on IIS 7.0 (KB967535). This hotfix, which has already been installed on Windows 7, Windows Server 2008 Service Pack 2, and Windows Server 2008 R2, updates the ASP.NET common language runtime (CLR) to recognize a new option of optimizing compilations. To take advantage of this option, set the optimizeCompilations property of the <compilation> tag in your web.config file to true:

<compilation optimizeCompilations="true">

This change significantly improves the initial page load time after you have installed a solution to the bin directory.

You must install the ADO.NET Data Services Update for .NET Framework 3.5 SP1 to enable REST-based data services. This update is available for Windows Server 2008 Service Pack 2, Windows Vista Service Pack 1, and Windows Vista Service Pack 2 and for Windows Server 2008 R2 and Windows 7.

Windows 7 and Windows Vista cannot be used for production deployments of SharePoint 2010. If you use Windows 7 or Windows Vista for your development environment, you should have access to a test environment that has the same operating system installed as your production environment. Windows 7 and Windows Vista are recommended only for developer workstations and should be used only for stand-alone installations. You can use a separate Microsoft SQL Server instance, but you should not configure your installation as a SharePoint farm and you should not host active sites on this configuration.

SharePoint requires your operating system to have certain prerequisites installed before installation begins. For this reason, SharePoint includes a PrerequisiteInstalle.exe tool that installs all of these prerequisites for you. If your developer workstation is set up with the Windows Server 2008 Service Pack 2 or Windows Server 2008 R2 operating system, you can install SharePoint 2010 by running the PrerequisiteInstaller.exe tool (which is included with SharePoint 2010) to install the prerequisites that SharePoint needs, and then run Setup.exe. However, you cannot use PrerequisiteInstaller.exe on Windows 7 or Windows Vista. For those operating systems, you must follow the additional instructions in this section.

Because the default installation works only for Windows Server 2008, you must edit one configuration file and install many of the prerequisites manually. You must perform each of the following steps while logged on with an account that has administrator access on the local computer. These steps assume that you received the SharePoint 2010 distribution as a single compressed executable file named SharePointFoundation.exe for SharePoint Foundation 2010 and setup.exe for SharePoint Server 2010.

To set up a developer workstation

  1. Copy the SharePointFoundation.exe (or setup.exe) installation file to a folder on the computer where you are installing SharePoint and doing your development, such as in the following path:c:\SharePointFiles
  2. Extract the installation files by opening a Command Prompt window, and then typing the following command at the directory location of the folder where you copied the installation files in the previous step.For SharePoint Foundation 2010:

    c:\SharePointFiles\SharePoint /extract:c:\SharePointFiles

    For SharePoint Server 2010:

    c:\SharePointFiles\OfficeServer /extract:c:\SharePointFiles

  3. Using a text editor such as Notepad, open the installation configuration file, config.xml, located in the following path: c:\SharePointFiles\files\Setup\config.xmlAdd this line inside the <configuration> tag:

    <Setting Id="AllowWindowsClientInstall" Value="True"/>
  4. Save the configuration file.
  5. Review the complete configuration file. It now looks similar to the following for SharePoint Foundation 2010. The complete configuration file will be longer for SharePoint Server 2010 (and therefore the text below cannot replace the contents of that file), but should use the same setting for the AllowWindowsClientInstall attribute.

    <Configuration>
      <Package Id="sts">
        <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" />
      </Package>
      <DATADIR Value="%CommonProgramFiles%\Microsoft Shared\Web Server
       Extensions\14\Data" />
      <Logging Type="verbose" Path="%temp%" Template="Microsoft Windows
       SharePoint Services 4.0 Setup *.log" />
      <PIDKEY Value="PIDKey Value" />
      <Setting Id="UsingUIInstallMode" Value="1" />
      <Setting Id="SETUP_REBOOT" Value="Never" />
      <Setting Id="AllowWindowsClientInstall" Value="True"/>
    </Configuration>

    All of the text in this configuration file is case-sensitive. If you do not edit the configuration file as described in the previous step or if you do not save the configuration file, when you try to run the installation you see the error message shown in Figure 1.

    Figure 1. Setup is unable to proceed error message

    Setup is unable to proceed

  6. If you are using Windows Vista Service Pack 1 or Windows Vista Service Pack 2, you must install the following prerequisites:
  7. If you are using Windows Vista Service Pack 1, Windows Vista Service Pack 2, or Windows 7, install the following additional prerequisites:
  8. Manually enable each of the required Windows Features. You can do this quickly by copying and running the following command in a Command Prompt window.
    Caution note Caution
    The following text contains line breaks.

    start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;^
    IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;^
    IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;^
    IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;^
    IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;^
    IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;^
    IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;^
    IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;^
    IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;^
    WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;^
    WCF-NonHTTP-Activation
  9. Verify that the required Windows Features are enabled. The command in the previous step enables all of the required features in the Internet Information Services section of the Windows Features dialog box (which you can access through the Programs section in Control Panel). Use Figure 2 and Figure 3 to check that you have enabled all of the required Windows Features. If any features are missing in your operating system, return to the Internet Information Services section of the Windows Features dialog box and enable them.
    Note Note
    The following figures represent one Windows Features dialog box on a computer running the Windows 7 operating system. They have been broken into two figures for the sake of readability. The list of Windows Features will look the same on Windows Vista.
    Figure 2. First part of Windows Features list from Windows 7

    First part of Windows Features list 

    Figure 3. Second part of Windows Features list from Windows 7

    Second part of Windows Features list

  10. Restart your computer to complete the changes that you made to Windows Features.
  1. To install SharePoint Server 2010 or SharePoint Foundation 2010, open a Command Prompt window, and then type the following at the command prompt:

    c:\SharePointFiles\Setup.exe
  2. Accept the Microsoft Software License Terms.
  3. On the Choose the installation you want page, click Standalone to install everything on one developer workstation.
    Figure 4. Installation type choice

    Installation type choice

  4. If any errors occur in the installation, review the log file. To find the log file, open a Command Prompt window, and then type the following commands at the command prompt. The log file is displayed at the end of the directory listing.

    cd %temp%
    dir /od *.log
    Tip Tip
    A link to the log file also appears when the installation is complete.
  5. After the installation is complete, you are prompted to start the SharePoint Products and Technologies Configuration Wizard. If you are using a local instance of Microsoft SQL Server 2008, install the Microsoft SQL Server 2008 KB 970315 x64 before starting the wizard. If your development environment uses a remote instance of Microsoft SQL Server 2008 or if it has a pre-existing installation of Microsoft SQL Server 2008 on which KB 970315 x64 has already been applied, this step is not necessary. With the wizard open, do the following:
    1. Install SQL Server 2008 KB 970315 x64.
    2. After the Microsoft SQL Server 2008 KB 970315 x64 installation is finished, complete the wizard.
  6. Alternatively, you can choose not to run the wizard by clearing the SharePoint Products and Technologies Configuration Wizard check box and closing the completed installation dialog box. Install SQL Server 2008 KB 970315 x64, and then manually start the SharePoint Products and Technologies Configuration Wizard by opening a Command Prompt window and executing the following command:

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\psconfigui.exe
Caution note Caution
The SharePoint Products and Technologies Configuration Wizard may fail if you are using a computer that is joined to a domain but that is not connected to a domain controller. If you see this failure, connect to a domain controller either directly or through a Virtual Private Network (VPN) connection, or sign in with a local account that has administrative privileges on the computer.

After the configuration wizard is complete, you see the new SharePoint site.

Figure 5. New SharePoint site

New SharePoint site

After you set up a working development environment on a physical host computer, you can store your setup as a virtual computer, so that others can use it, or so that you can reuse this “clean” installation at a later date. Alternatively, you can set up a development environment on a newly created virtual machine. The Hyper-V role in Windows Server 2008 Service Pack 2 provides infrastructure and management tools that enable you to create multiple server environments on a single host. For more information, see Getting to Know Hyper-V: A Walkthrough From Initial Setup to Common Scenarios. For a useful Windows PowerShell script that enables you to create a virtual hard drive (VHD) out of an existing Windows Server 2008 image, see Install-WindowsImage PowerShell Script on MSDN Code Gallery.

If you are using Windows 7, you can also create a VHD on which SharePoint is installed in Windows Hyper-V, and then configure Windows 7 with BDCEdit.exe so that it boots directly to the operating system on the VHD. This improves performance because the virtualization layer is not present. It also enables you to use VHD differencing disks (VHDs that contain only elements that differ from a single base installation), which save disk space and make it easier to roll back changes. See Deploy Windows on a Virtual Hard Disk with Native Boot to learn more about this kind of configuration.

If you choose to create a single server installation on a virtual computer, the standard memory requirements still apply. Your virtual computer requires at least 2 GB (preferably 4 GB) of RAM. Virtualization also gives you the opportunity to create a server farm that includes more than one machine. In a farm installation of SharePoint Server 2010, each machine requires at least 1.5 GB (preferably 2 GB) of RAM. You could run a fully functional domain infrastructure on a setup installation such as the following example installation:

  • Two virtual computers, each with 2 GB of RAM
  • Domain controller and Microsoft SQL Server 2008 running on one computer
  • SharePoint Server 2010 and two Web applications (including Central Administration) running on another computer

Source: http://msdn.microsoft.com/en-us/library/ee554869.aspx

SharePoint Server 2010 Development VM for VirtualBox or VMWare

Scenario

Prerequisites

  • Your workstation must be running a 64bit processor with Hardware Virtualization enabled
  • You must have enough memory, disk space, and processor power to run the VM and hold all snapshots
  • You must have access to and appropriate licensing for (ex: MSDN Subscription) above products
  • You must have time (about 8 hours) to install everything.  
    • Hints:
      • Look for “Wait” for good break points
      • Snapshots can be used to create other virtual machines or to test minimally installed environments

How To

  • Download the Software Listed Above
  • Install VirtualBox and the Extension Pack or VMWare
  • Create a new virtual machine named “sps2010” for Windows 2008 (64bit)
    • 4096 GB RAM
    • 40.45GB dynamically expanding boot hard disk
    • Mount the Windows Server 2008 R2 ISO
    • Enable RDP support
  • Start the sps2010 virtual machine
  • The Windows Server 2008 R2 installer should begin
    • Select Windows Server 2008 R2 Standard (Full Installation)
    • Select New Installation
  • Set a new administrator password
    • pass@word1
  • Install VirtualBox Guest Additions or VMWare Tools
    • Auto Reboot
  • Authenticate Windows
  • Rename the server to sps2010
    • Note: If you forget this step, you will have a randomly named server.
      I have included instructions for aliasing and configuring a randomly named server.
  • Shut down and take a Snapshot named “Windows Install”
  • Enable Remote Desktop for all versions
  • Add Roles
    • Active Directory Domain Service
    • You will get a Windows Update is not enabled warning.
    • Select “Close this wizard and launch the Active Directory Domain Services Installation Wizard”
    • Ignore the “Operating System Compatibility” warning
    • Select “Create a new domain in a new forest”
    • FQDN: sp.local
    • Forest functional level: Windows Server 2008 R2
    • Ignore DHCP warning
    • Ignore DNS warning, click Yes
    • Use same password as admin user above
    • Reboot on completion
  • Add Roles
    • Server Roles
      • Application Server
      • Web Server (IIS)
    • Application Server / Role Services
      • Web Server (IIS) Support
    • Web Server (IIS) / Role Services
      • Leave Default Selections
    • Install
  • Windows Update: Turn on auto updates
    • Install Updates and Long Wait
    • Reboot when prompted
  • Open Active Directory Administrative Center
    • Create a user
      • Full Name: User
      • User SamAccount: sp\user
      • pass: same as admin above
      • Password Options: Password never expires
  • Stop and Disable the following Services
    • DFS Namespace
    • DFS Replication
  • Shut down, snapshot “DC and IIS”, and start virtual machine
  • Mount the SQL Server Iso from the Virtual Box Devices menu
  • Open Active Directory Administrative Center
    • Create a user
      • Full Name: spservice
      • User SamAccount: sp\spservice
      • pass: same as admin above
      • Password Options: Password never expires
  • Start SQL Server Setup
    • Installation
    • New Install
    • Continue
    • Ignore DC and Firewall warnings
    • All Features with Defaults
    • Continue
    • Server Configuration / Service Accounts
      • Use the same account for all SQL Server services
        • specify the sp\spservice account and password created above
    • Continue
    • Analysis Services Configuration
      • Account Provisioning
        • Add Current User
    • Reporting Services Configuration
      • Install the SharePoint integrated mode default configuration
    • Continue then Wait
  • Shut down, snapshot “SQL Server”, and start virtual machine
  • Open SQL Server Configuration Manager
    • SQL Server Network Configuration
      • Protocols for MSSQLSERVER
        • Enable Named Pipes
  • If your server is randomly named – not sps2010
    • DNS Manager
      • Forward Lookup Zones
        • sp.local
          • Add a new alias
            • Name: sps2010
            • FQDN: Browse to splocal\servername
              • servername will be a randomly generated value
  • Mount the SharePoint Server 2010 iso
  • Start the Prerequisites installer
  • Start the SharePoint Install
    • Enter your Enterprise license key
    • Wait
    • Run the Configuration Wizard
    • Create a new server farm
    • Configuration Database
      • Server: sps2010
      • Name: SharePoint_Config
      • Username: sp\spservice
      • Password: same as above
    • Farm Security Settings
      • Passphrase: same as admin password above
    • Central Admin Web App
      • Port: 8000
      • Auth: NTLM
    • Short Wait
  • IE will open to the central administration website.
    • Login as administrator
    • Move the central admin site from the Trusted Sites zone to the Local Intranet Zone
  • Shut down, snapshot “Base SharePoint”, and restart
  • Configure Alternate Access Mappings
  • Run the Farm Configuration Wizard from Central Administration
    • Use existing managed account
    • All items should be checked except for Lotus Notes
    • Create Root Site Collection
      • New Web Application
        • Name: sps2010
        • Port: 80
        • Path: change “80” to “sps2010”
        • URL: http://sps2010
        • Create a new app pool
          • Name: SharePoint – sps2010
          • Configurable: sp\spservice
        • Database server: sps2010
        • Database name: sps2010_Content
        • CEIP: No
      • Title: Sps2010
      • Template: Publishing \ Publishing Portal
      • Primary admin: sp\administrator
  • Set the browser home page to http://sps2010
  • Configure Search from Central Admin
    • Central Admin \ Manage service applications \ Search Service Application (first one)
      • Content Sources
        • Local SharePoint Sites
          • Schedule incremental every 5 minutes and start a full crawl
  • Open http://sps2010 in IE
    • Add sp\administrator to the Approvers and Members groups
    • Validate that the following work
      • Approval process
      • Both search scopes
      • My Site
      • Profile
  • Shut down, snapshot “SharePoint Configured”, and restart

This Part covers Application, Office Web Apps, and Mail Server installation


Install

  • Boot up the virtual machine
  • In VirtualBox or VMWare, share the folder on the host machine where the install files are
    • In VirtualBox, Shared Folders appear under Network\VBOXSVR
  • Run the SharePoint Designer Install
    • Close when prompted to go online
  • Open SharePoint Designer
    • Select Use Standard Settings
    • Close SharePoint Designer
  • Mount the Office Professional Plus iso
  • Run the Setup
    • Enter your license key
    • Click through the Install
    • Do not go online, close.
  • Add mx record to DNS Server
    • Open DNS Manager
      • Forward Lookup Zones \ sp.local
        • Right-click \ New Mail Exchanger (MX) …
          • Leave Host domain blank
          • FQDN of mail server: sps2010.sp.local
          • priority: 10
  • Install hMailServer (lightweight alternative to Exchange)
    • Browse to the mapped folder containing the hMailServer executable and run it
      • Use external database engine
      • Create a new hMailServer database
      • Microsoft SQL Server
        • DB address: sps2010
        • DB name: hMailServer
        • Use Windows Auth
      • Service: SQL Server (MSSQLSERVER) (MSSQLSERVER)
      • Password: same as admin password from part1
      • Finish
    • Now hMailServer Administrator should be open
      • Connect to administrator on localhost
      • Add Domain
        • Domain: sp.local
        • Advanced
          • Catch-all address: administrator@sp.local
        • Save
      • Add User
        • Address: administrator
        • Password: same as admin password from part1
        • Administration level: Server
        • Active Directory Tab
          • Domain: sp.local
          • User Name: administrator
        • Save
      • Settings \ Advanced
        • Default Domain
          • sp.local
        • Administration password
          • same as admin password from part1
        • IP Ranges
          • Add
            • Name: sp.local
            • Lower IP: 10.0.0.1
            • Upper IP: 10.255.255.255
        • Save
      • Exit
  • Configure administrator user’s email address and remove password expiration
    • Open Active Directory Administrative Center
      • Users
        • Administrator
          • General\Email: administrator@sp.local
          • Account\Account Options: check “Password never expires”
  • Disable IE ESC
    • Server Manager / Configure IE ESC / Administrators = Off
    • This will prevent the about:internet trusted site prompt within Outlook
  • Reset the Internet Explorer home page to http://sps2010
  • Open Outlook 2010
    • Configure Email account
      • Name: Admin
      • Email: administrator@sp.local
  • Configure SharePoint outgoing mail server
    • Open SharePoint Central Administration
      • System Settings
        • Configure Outgoing Email settings
          • Outbound SMTP server: sps2010
          • From address: no-reply@sp.local
  • Configure User Profile Sync
    • Add spservice user to the local administrator group
      • Open Active Directory Administrative Center
        • Users \ spservice \ Add to group
          • Administrators
            • This is necessary to start the User Profile Synchronization Service
    • Grant Replicate Directory Changes permissions on sp.local to sp\administrator
      • Open Active Directory Users and Computers
      • Right-click sp.local and select Delegate Control
    • Grant Full Control rights to Network Service on the C:\Program Files\Microsoft Office Servers\14.0 directory
      • This prevents Application Event Log warning event ids: 1015, 1001, and 1004
      • More Info
    • Open SharePoint Central Administration
      • Application Management
        • Manage Services on Server
          • Start the User Profile Service
            • Use the spservice username and password
          • Start the User Profile Synchronization Service
            • Use the spservice username and password
          • Reset IIS (cmd\iisreset)
        • Manage Service Applications
          • User Profile Service Application
            • Before continuing, make sure the Forefront Identity Manager Service has started
              • Task manager \ services \ services
              • If not, you will receive an error: “MOSS MA not found”
            • Synchronization \ Configure Synchronization Connections
              • Create New Connection
                • Connection Name: sp local users
                • Forest Name: sp.local
                • Account Name: sp\spservice
                • Password: same as before
                • Populate Containers
                  • Navigate to SP
                    • Check Users (first one)
            • Synchronization \ Start Profile Synchronization
              • Start Full Synchronization
              • Wait for this to complete
                • Refresh the page until it says Synchronizing, then wait for about 20 minutes until idle
              • Verify that the sp\administrator profile contains the updated email address.  If not, manually populate.
  • Open SharePoint Workspace
    • Create a new account
      • Name: Admin
      • E-mail: administrator@sp.local
      • check “Allow me to recover my account later”
      • Finish
  • Install Visual Studio 2010
    • Mount the Visual Studio 2010 Premium CD iso
    • Run the installer
    • Install Full
      • Good thing we allocated enough disk space 🙂
    • Ignore the “SQL Server Express Service Pack 1” install error
      • We installed the full version of SQL Server, not SQL Express
    • Finish and do not check for updates
    • Set to run as administrator
      • Browse to the Visual Studio 2010 shortcut in the start menu
        • Right-click the shortcut and select properties
        • Select Advanced…
        • Check “Run as Administrator”
        • OK, OK.
  • Install Visual Studio Team Explorer 2010
    • Mount the Visual Studio Team Explorer 2010 CD iso
    • Run Setup.exe from the CD
    • Step through the install
    • Finish
  • Install Visual Studio 2010 Service Packs – SP1 at time of article
    • Run the VS10sp1 installer
    • Step through the install
      • This downloads realtime, so make sure you have a high-speed internet connection
    • Wait a very long time for this to download and install
    • When prompted, reboot the machine
  • The remaining instructions have not yet been vetted.  Please check back later for more info.
  • Install CodeRush Express
  • Install Google Chrome
  • Install Firefox
  • Install Safari
  • Install Snagit
  • Install Firebug
  • Install Fiddler
  • Install Paint.Net
  • Install Windows Live Essentials
  • Shut down and take a snapshot named “SP Dev Workstation”
  • Start the Virtual Machine
  • Install Office Web Apps
    • Instructions coming soon
  • Shut down and take a snapshot named “SP Dev Workstation with Office Web Apps”
  • Apply any SharePoint service packs as needed
    • We do this last so you have the option of testing against different SharePoint builds and testing Service Pack deployments against existing Sites
  • Shut down the virtual machine and backup to another machine
  • Distribute to the developers in your team and enjoy!

 

 

 

Wonderfull: An Overview for Developers on SharePoint Online

Reference: http://msdn.microsoft.com/en-us/library/gg317460.aspx

Summary:  Learn about the developer features that are coming to SharePoint Online, strategies and patterns for successfully developing on SharePoint Online, and links to additional resources for developers to deepen their knowledge of these extensibility features.

Available in SharePoint Online

note Note:
This article is prerelease documentation for SharePoint Online and is subject to change. It describes functionality that is available in the SharePoint Online Beta program, based on Microsoft SharePoint 2010 technology, not the current SharePoint Online subscription service. For more information about the SharePoint Online Beta service, see the SharePoint Online home page for the Office 365 Beta program.

Applies to:  Microsoft SharePoint Online

Provided by:  The SharePoint Developer Documentation Team

Content

Introduction to SharePoint Online

SharePoint Online is a cloud-based service, hosted by Microsoft, for businesses of all sizes. Instead of installing and deploying SharePoint Server on premises, any business can now simply subscribe to SharePoint Online to provide their employees with an enterprise-grade solution to create sites to share documents and insights with colleagues, partners and customers.

SharePoint Online provides sites to:

  • Manage and share important documents
  • Keep teams in sync and manage important projects
  • Stay up to date with company information and news
  • Share documents securely with partners and customers
  • Market your business using a simple public-facing website

SharePoint Online works with familiar Microsoft Office applications. It is easy to create Office documents and save them directly to SharePoint Online, or co-author documents with Office Web Apps. Users can access important documents offline or from familiar mobile devices, and set document-level permissions to protect sensitive content. With one click it is possible to communicate in real time with colleagues, customers, and partners from within SharePoint sites.

By letting Microsoft assume much of the operational burden that comes from managing the infrastructure that is associated with on-premises software, businesses can focus their resources on what is important—their businesses. Small-sized and medium-sized businesses can now take advantage of the same enterprise-strength collaboration platform that larger-sized companies do, without having to shoulder the operational and hardware infrastructure necessary to host SharePoint on-premises.

As a cloud-based service, SharePoint Online uses redundant and geographically dispersed data centers. Each data center houses a reliable and redundant infrastructure to support the service. And SharePoint Online provides businesses with the flexibility to scale resources as demands change.

SharePoint Online offers developers a flexible, robust framework for customizing and developing solutions for use in the multitenant environment of the cloud. The development features and patterns you use in developing for SharePoint Online are a subset of those available for developing for SharePoint 2010 on-premises.

This article presents an overview of the developer features that are available in SharePoint Online, introduces strategies and patterns for successfully developing on SharePoint Online, and provides links to more resources for developers to deepen their knowledge of these extensibility features.

Customization and Development Strategies

There are three basic ways to customize SharePoint Online:

  • Configuration by using the browser   Customizations that you can perform by using the SharePoint Online user interface in your browser. For example, you can edit page layouts, add and customize the default Web Parts, add lightweight Microsoft Silverlight widgets to a page, or embed jQuery code in a Content Editor Web Part.Because in-browser configurations are primarily performed by end users, they are outside the scope of this article. For more information for enterprises, see the SharePoint Online Planning Guide for Office 365 Beta for Enterprises. For more information for small businesses, see SharePoint Online Planning Guide for Office 365 Beta for Small Businesses.
  • Customization by using SharePoint Designer   Microsoft SharePoint Designer 2010 is a Web and application design program you can use to design, build, and customize your websites within SharePoint Online. With SharePoint Designer 2010, you can create data-rich webpages, build powerful no-code workflow-enabled solutions, and design the appearance and behavior (look and feel) of your site. Customizations that you can perform in SharePoint Designer are generally declarative, and can also employ client-side scripting.
  • Developing SharePoint Online solutions that contain custom code   To enable more technically complex solutions, SharePoint Online provides both server and client object models for developers. Microsoft Visual Studio 2010 provides a range of specialized templates for creating sandboxed solutions that contain a variety of SharePoint items, such as site and list definitions, workflows, Web Parts, event receivers, and content types, to include in your SharePoint solutions.

Accessing Developer Features

Be aware that SharePoint Online provides a range of user licenses, and the user license you have determines which developer features you have rights to use. Consult the SharePoint Online Developer Feature Availability Matrix in the SharePoint Online General Reference to determine the developer features your user license provides you access to.

Customizing SharePoint Online Using SharePoint Designer 2010

SharePoint Designer 2010 is the tool of choice for rapid development of SharePoint applications. Using SharePoint Designer 2010, advanced users and developers can create SharePoint solutions in response to business needs. Advanced users can compose no-code solutions that encompass a variety of common scenarios, from collaborative sites to human workflows, leveraging the building blocks that are available in SharePoint in an easy to use environment. In addition, developers can use SharePoint Designer 2010 to get a quick start on SharePoint development projects.

SharePoint Designer 2010 delivers a powerful site-authoring experience by providing one place where you can do the following, all without writing a line of code:

  • Create a SharePoint site
  • Customize the components that compose the site
  • Design the logic of the site around a business process
  • Deploy the site as a packaged solution

The tasks you perform in SharePoint Designer are generally referred to as customizations, instead of development, because tasks performed in SharePoint Designer require you to create or edit SharePoint items declaratively, instead of using server-side code. (Some tasks you perform in SharePoint Designer can employ client-side scripting.)

You should be aware of an important aspect of SharePoint Designer customization: When you are using SharePoint Designer, you are editing directly against the selected SharePoint Online site. This differs from SharePoint solution development in Visual Studio 2010, where you create and debug your solution on a local SharePoint installation, and then deploy the completed solution to the solution gallery in SharePoint Online.

SharePoint Designer is available as a free download from Microsoft. For more information, including system requirements, see Microsoft SharePoint Designer 2010 (32-bit).

SharePoint Designer Customization Areas

The business solutions you can create in SharePoint Online by using SharePoint Designer fall into the following main types of solutions.

  • Interactive data-rich user interfacesWith SharePoint Designer 2010, you can create powerful and dynamic user interfaces for your SharePoint data, and you can make them available in many places, including your SharePoint site and custom windows, panes, and fields in Microsoft Office business applications.

    The interfaces that you can create include custom views, forms, Web Parts, navigation, and custom Office client windows and task panes. This kind of flexibility enables you to create completely customized user experiences of your business data.

    You might combine multiple data sources into a single view, create dashboards with related item views, design custom forms tailored to individual roles, and customize the available toolbars and Server ribbon commands associated with the data.

  • Declarative workflows for managing business processesEvery business process in an organization consists of a set of activities that are connected based on a common business need. SharePoint declarative workflows are designed around this model by providing rules-based workflows that consist of sets of conditions and actions. You organize and run a series of actions that correspond to a work process that is based on a sequence of conditions and actions.

    By using SharePoint Designer 2010, you can create declarative, rules-based workflows that manage the business processes in an organization. Workflows automate both business application processes and human collaborative processes. Workflows for business application processes might update one data source when another data source changes; and workflows for human collaborative processes might send a document to an employee’s manager for approval.

    The declarative workflows you can build in SharePoint Designer introduce application logic to your business processes without requiring you to write code. This is made possible by the workflow designer in SharePoint Designer 2010, which allows nested logic, substeps, and more. Alternatively, you can design and share workflows by using Microsoft Visio 2010 with its flowchart templates that can be exported to SharePoint Designer 2010.

  • Connections to data that is inside or outside of SharePointWith SharePoint Designer 2010, you can connect to numerous data sources, and then integrate that data into your site and Office client applications. Your users, as a result, can see and interact with business data on your site and from within the programs you choose instead of connecting to those data sources separately.

    Directly from the ribbon, you can connect to an external database, SOAP service, REST (Representational State Transfer) service, and more. Connecting to data sources is a powerful feature of SharePoint Designer 2010 because there are so many supported options you can use to make data available to your users. With data connections, you can bring together lists and libraries, external databases and data sources via OLE DB or ODBC protocols, XML web services via SOAP, and more.

    noteNote:
    Currently in SharePoint Online, you cannot connect external business data sources by using the Microsoft Business Connectivity Services (BCS) framework.
  • Designed and branded sitesThe final area of customization provided by SharePoint Designer 2010 is design and brand—that is, taking a consistent look and feel and applying it to your SharePoint site. You can incorporate a company logo, color scheme, headers and footers, supporting graphics, custom navigation, and more. As a result, every page on the site can be immediately recognized as a part of a larger corporate site. In SharePoint Designer 2010, you design and brand SharePoint sites by using master pages, page layouts, and cascading style sheets.

    Designing and branding a site is different from the other pillars of customization, where the focus is on creating custom business solutions. Branding is something you generally perform less often and at the top of a site collection. That custom brand is then inherited by the site collection’s subsites. The branding effort is also likely to be performed by a web designer instead of a solution creator.

    For these reasons, master pages, page layouts, and cascading style sheets are disabled by default for all users except SharePoint Online administrators. In this way, only those responsible for the site brand have access to these powerful, yet sensitive files. You can re-enable them for specific users.

Restricting Access to SharePoint Designer

The SharePoint Online administrator has the ability to restrict the tasks for which other users can employ SharePoint Designer. The SharePoint Online administrator can do the following:

  • Restrict who can detach pages from the site definition
  • Restrict who can edit master page and page layouts
  • Restrict who can edit files in URL site hierarchy
  • Prevent the use of SharePoint Designer 2010 to edit sites

Deploying Custom SharePoint Solutions

SharePoint Designer includes functionality that enables you to package the SharePoint items you have created and edited, so that you can deploy them to another server or across the enterprise, or open them in Visual Studio 2010 for additional development. The Save as Template feature enables you to save a solution as a SharePoint solution package (.wsp) file. You determine what is saved in the .wsp file. It can contain the entire contents of your site, including data sources and structure, views and forms, workflows, and Web Parts, or you can save individual components, such as a list, a view, or a workflow.

This ability to save SharePoint items in .wsp files that can be opened in Visual Studio 2010 means that a designer can create the SharePoint items in the familiar, intuitive SharePoint Designer interface and then hand it off to a developer for further development in Visual Studio 2010, a tool that developers are familiar with. Or, if you are a developer, you can use SharePoint Designer for rapid application development, knowing you do not have to redo your work because you can easily port it to Visual Studio 2010.

Read More About Customizing SharePoint Online Using SharePoint Designer 2010

For an overview of the SharePoint Designer interface and capabilities, see Introducing SharePoint Designer 2010. For a more detailed list of resources to get you started, see Getting Started with SharePoint Designer.

Developing SharePoint Online Solutions

SharePoint Online introduces the concept of the SharePoint Online administrator. The SharePoint Online administrator is the user who has permissions to perform administrative tasks for a company’s sites within SharePoint Online. (This is in contrast to farm administration duties, which in SharePoint Online are performed by Microsoft.) Because SharePoint Online administrators own and administer site collections in SharePoint Online, instead of entire farm installations, the development approach to SharePoint Online is necessarily scoped to the site collection. Because of this, two developer features form the foundation of developing for SharePoint Online:

  • Sandboxed solutions   A specialized type of the SharePoint solutions framework, sandboxed solutions provide a framework for developers to create, and for SharePoint Online administrators to upload and activate, custom code solutions to SharePoint Online. Sandboxed solutions run in an environment that has access to a core subset of the server object model. The sandboxed solutions framework gives developers access to the major objects at and below the site collection level.
  • Client object model   The client object model provides three parallel and comparable representations of the core objects in the server-side SharePoint object model: a .NET Framework managed model, a Silverlight model, and an ECMAScript (JavaScript, JScript) model. This client object models provide remote access to SharePoint data and functionality.In addition, you can use the client-side code to access the web services that SharePoint Online makes available and external data sources. Because of this, client-side code is a useful option if you need to access either objects beyond those included in sandboxed solutions, but available through a SharePoint Online web service, or external data.

Figure 1 shows these development options: use the server object model available to sandboxes solutions, or employ the client object model and client-side code to access additional data that is available through the SharePoint web services, or data from external sources.

Figure 1. SharePoint Online development options

Development options in SharePoint OnlineNotice that the SharePoint Web Part actually runs in SharePoint Online. However, the client-side code it references is downloaded to and executes on the client, employing the SharePoint client object model to connect back to SharePoint Online for data transfer.

Sandboxed Solutions in SharePoint Online

For SharePoint Online development, you use the same framework to package and deploy your custom-coded solutions that you would for an on-premises SharePoint installation: the solutions framework. When developing for SharePoint Online, you create a specific type of solution, known as a sandboxed solution. A sandboxed solution enables SharePoint Online administrators to upload their own custom code solutions.

A sandboxed solution works in much the same way as a farm (full-trust) solution. For example, sandboxed solutions enable you to bundle all the components that can be used to extend SharePoint Online into a single new file, which is called a solution file. A sandboxed solution is a deployable, reusable package that can contain a set of Features, site definitions, and assemblies that apply to sites, and that you can enable or disable individually. You can use the sandboxed solution file to deploy the contents of a Web Part package, including assemblies, class resources, Web Part description (.dwp) files, and other package components.

Sandboxed solutions differ from farm solutions primarily in how they are deployed, and the extent of access they have to the server object model. As mentioned earlier, sandboxed solutions run in a separate process that has access to a core subset of the server object model. A solution gallery is used to store all sandboxed solutions.

In addition, sandboxed solutionsare assigned a custom code access security (CAS) policy with the following permissions:

For more information about CAS policies, see Using Code Access Security with ASP.NET and Security Guidelines: .NET Framework 2.0.

Components Available in Sandboxed Solutions

You can include the following programmatic or declarative items in your sandboxed solutions:

  • Code components:
    • Feature receivers
    • Event receivers
    • Navigation
    • Web Parts (if derived from the WebPartclass)
      noteNote:
      To use Visual Studio 2010 to create visual Web Parts that can be deployed as part of a sandboxed solutions, you must first install the Visual Studio 2010 SharePoint Power Tools. These tools are a a set of templates and extensions that provides additional functionality to SharePoint developers, and contain an item template that enables you to use a visual designer to create SharePoint Web Parts that can be deployed in a sandboxed solutions.
    • Microsoft InfoPath forms logic
    • SharePoint Designer workflow activities
    • Sandboxed solutions workflow activities
  • Declarative components:
    • Declarative workflows
    • Content types, site columns
    • Lists and list definitions
    • Visual and nonvisual Web Parts
    • Custom actions, ribbon extensions
    • Client-side technologies
    • Web templates, site pages, page layouts, and master pages

The following capabilities and elements are not supported in sandboxed solutions:

  • Access to the Internet to make web service calls
  • Access to a hard disk to read or write filesYou can, of course, read and write to lists and libraries within SharePoint Online.
  • Web application-scoped or farm-scoped Features
  • Adding assemblies to the global assembly cache
  • Running security-related functionality; for example, RunWithElevatedPrivileges or other SPSecurity methods
  • Custom Action groups
  • HideCustomAction element
  • Content type binding
  • Web Part connections

SharePoint Online Solution Development Process

The following are the basic steps in the process of creating, deploying, and activating a sandboxed solution on SharePoint Online:

  1. Develop and test the solution.To create or customize SharePoint Online solutions, you must develop the solution on a local computer where SharePoint Server 2010 or SharePoint Foundation 2010 is installed. This includes debugging the solution; you will not be able to debug the solution directly on SharePoint Online.

    After you set up your development environment, you can use Visual Studio 2010 to create your sandboxed solutions. As a tool for promoting rapid development of SharePoint solutions, Visual Studio 2010 provides such features as advanced debugging tools, IntelliSense, statement completion, and project templates. Visual Studio 2010 provides a range of specialized templates for creating SharePoint items to include in your sandboxed solutions, such as site and list definitions, workflows, Web Parts, event receivers, and content types. In addition, Visual Studio 2010 can open and edit solution package (.wsp) files that are created in SharePoint Designer 2010, enabling designers and developers to tightly collaborate on solutions through a common framework.

    For more information about setting up your development environment, including hardware recommendations, operating system and Hyper-V options, and prerequisites, see Setting Up the Development Environment for SharePoint 2010 on Windows Vista, Windows 7, and Windows Server 2008.

    For information about how to use and customize Visual Studio 2010 to maximize your efficiency, see Using Visual Studio for SharePoint Development.

  2. Deploy and activate the solution.After you create and debug your sandboxed solutions on your local computer, you must hand that solution off to your SharePoint Online administrator, if you do not have SharePoint Online administration permissions. The SharePoint Online administrator uploads the solution package (.wsp) file to the Solution Gallery for activation.

    For more information, see Deploying a Sandboxed Solution.

    To make the solution available to users, you must activate it. If your sandboxed solution package contains a Feature that is scoped to the site collection level, it is activated automatically. Any Feature that is scoped to the site level must be activated on the Manage site features page located at http://servername/site/subsite/_layouts/managefeatures.aspx.

  3. Monitor the activitated solution.Activated solutions are monitored in terms of the resources they consume. Solution performance can be monitored by using multiple types of measures including CPU execution time, memory consumption, and database query time.

Figure 2 shows the main steps of the sandboxed solution development process for SharePoint Online.

Figure 2. Sandboxed solution development in SharePoint Online

Sandboxed solution development process

Additional Solution Restrictions in SharePoint Online

Because it is a multi-tenant environment, when you upload a sandboxed solution to the Solution Gallery, SharePoint Online performs a further round of validation checks, in addition to those performed by on-premise SharePoint installations. A sandboxed solution cannot be activated if it contains code calling any of the following namespaces:

In addition, the following types and members cannot be called from code in a sandboxed solution in SharePoint Online:

Read More About Sandboxed Solutions

For information about the capabilities and elements that are available for use in sandboxed solutions, CAS policy for sandboxed solutions, and resource monitoring of sandboxed solutions, see Sandboxed Solutions Architecture.

To learn how to deploy a sandboxed solution as a SharePoint Online administrator, see Deploying a Sandboxed Solution.

For a list of the server object model types and members available in sandboxed solutions, see Microsoft.SharePoint.dll APIs Available from Sandboxed Solutions.

For a reference implementation of a sandboxed solution, see Reference Implementation: The Sandbox Execution Model.

For training on sandboxed solutions, see Sandboxed Solutions on Channel 9.

Accessing SharePoint Data Through the Client Object Models

SharePoint Online includes three client object models, each of which provides roughly the same subset of the server object model that is defined in Microsoft.SharePoint.dll. The ECMAScript, .NET Framework managed, and Silverlight client object models each include objects that correspond to major objects at the site-collection level or lower in the SharePoint hierarchy. The object models provide a consistent and easy-to-use, object-oriented system for interoperating with SharePoint data from a remote client or server.

Because code written against the client object models runs remotely on the client, it is not subject to the same restrictions as sandboxed solutions, and can, for example, access external data sources.

To improve security and performance, the client object models contain only the most relevant APIs for client development, not all the types and members that are represented in the server object model. Limiting the size of the client libraries reduces the amount of time that is required to download the libraries in the Silverlight and ECMAScript contexts. In addition, the new APIs are designed to minimize the number of roundtrips that must be implemented for common actions.

The client object models are provided through proxy .js files and managed .dll files, which can be referenced in custom applications just as other object models. The object models are implemented as a Windows Communication Foundation (WCF) service, but they use web bindings to implement efficient request batching. All operations are inherently asynchronous, and commands are serialized into XML and sent to the server in a single HTTP request. For every command, a corresponding server object model call is made, and the server returns a response to the client in compacted JavaScript Object Notation (JSON) format, which the proxy parses and associates with appropriate objects. Figure 3 shows the call and response flow for client object models.

Figure 3. SharePoint client object model architecture

SharePoint client object models architectureThe client object models share structural design traits, such as object model hierarchy, object identity, data retrieval semantics, client context, infrastructural client objects, collections, and exception handling. The object models are consistent with the server object model. So, if you are familiar with the server-side API, you can quickly learn to use the client .NET Framework managed, Silverlight, or ECMAScript API. In addition, the client object models generally have parity with each other, so when you learn one subset of the server object model, you have also learned most of the other subsets.

Programs running on the client, and using one of the client object models, can add and remove lists, add, update, and delete list items, modify documents in document libraries, create sites, manage permissions of items, add and remove Web Parts from a page, and much more.

Some supported development areas include:

  • Site collections and sites
  • Lists, list items, views, and list schemas
  • Files and folders
  • Web, list, and list item property bags
  • Web Parts
  • Security
  • Content types
  • Site templates and site collection operations

Using the Silverlight Client Object Model in SharePoint Online

You can use Silverlight, and the Silverlight client object model, to create rich, sophisticated applications within SharePoint Online. You can host your Silverlight (.xap) application in its own ASPX page, or in a Web Part. SharePoint Online includes a default Silverlight Web Part, or you can create a custom Web Part as part of a sandboxed solution.

To use the SharePoint Silverlight object model within a Silverlight Web Part, you can create a Silverlight application in Visual Studio 2010, and add your code to the Page class in the default Page.xaml.cs file of your project. After you build your project, upload the project’s application package (.xap) file to any document library you choose. Insert a Silverlight Web Part into a Web Parts page and point the URL source of the Web Part to the .xap file’s path location in the document library. The Web Part can contain custom properties that are sent to Silverlight via the InitParameters property.

Use forms-based authentication (FBA) to authenticate users against SharePoint Online.

In addition, you can use Visual Studio 2010 to create a single solution (.wsp) file that performs the following actions when deployed and activated:

  • Deploys a Web Part, based on the default Silverlight Web Part, to host your Silverlight application
  • Deploys the Silverlight application package (.xap) file, packaged as a module, to the specified document library location
  • Creates pages, which contain your Web Part embedded in them, in the site pages collection

After the solution is activated, the user can navigate to the created pages and interact with the Web Part hosting the Silverlight application. The application itself can make use of the SharePoint Silverlight object model to access SharePoint Online data remotely, even though it appears to the user to be hosted within SharePoint Online.

Using the ECMAScript Object Model in SharePoint Online

You can employ the ECMAScript object model in SharePoint Online in a similar way. You can include custom code that uses the ECMAScript object model within a script block on an .aspx page, or you can create a separate .js file to include your code and reference it from the .aspx page. For more information, see Setting Up an Application Page for ECMAScript.

Read More About SharePoint Client Object Models

For a more detailed introduction to the client object models, see Using the SharePoint Foundation 2010 Managed Client Object Model. For detailed technical information and implementation instructions, see the following sections in the SharePoint 2010 SDK:

For information about creating Silverlight client applications, see Using the Silverlight Object Model and How to: Use a SharePoint Project to Deploy a Silverlight Application.

For a reference implementation example of using the SharePoint client object models, see Reference Implementation: Client.

For API reference information, see Client Class Library and ECMAScript Class Library.

For training on the SharePoint client object models, see Client Object Model on Channel 9.

SharePoint Web Services Available in SharePoint Online

Table 1 lists the default Web services that are available in SharePoint Online. Although these, as with any external data connection, are not available for use in sandboxed solutions, you can access them through client applications such as Silverlight and ECMAScript.

Table 1. Web services available in SharePoint Online

Web service Description
WebSvcAlerts Provides methods for working with alerts for list items in a SharePoint site.
WebSvcCopy Provides services for copying files within a SharePoint site and between SharePoint sites.
WebSvcDWS Provides methods for managing Document Workspace sites and the data they containThe following method is not available in SharePoint Online:

  • FindDwsDoc
WebSvcImaging Provides methods that enable you to create and manage picture libraries.
WebSvcLists Provides methods for working with SharePoint lists, content types, list items, and files.The following method is not available in SharePoint Online:

  • AddDiscussionBoardItem
WebSvcMeetings Provides methods that enable you to create and manage Meeting Workspace sites.
WebSvcPeople Provides methods for associating user identifiers (IDs) with security groups for site permissions.
WebSvcPermissions Provides methods for working with the permissions for a site or list.
WebSvcSiteData Provides methods that return metadata or list data from sites or lists.
WebSvcsites Provides methods for returning information about the site templates for a site collection
WebSvcspsearch Provides methods for accessing Search results from client applications and web applications outside of the context of a SharePoint site.
WebSvcUserGroup Provides methods for working with users and groups.
WebSvcVersions Provides methods for working with file versions in SharePoint document libraries.
WebSvcviews Provides methods for creating, deleting, or updating list views in SharePoint Online.
WebSvcwebpartpages Provides methods for working with Web Parts.The following methods are not available in SharePoint Online:

  • AssociateWorkflowMarkup
  • ExecuteProxyUpdates
  • GetAssemblyMetaData
  • GetDataFromDataSourceControl
  • GetFormCapabilityFromDataSourceControl
  • RemoveWorkflowAssociation
  • ValidateWorkflowMarkupAndCreateSupportObjects
WebSvcWebs Provides methods for working with sites and subsites.The following method is not available in SharePoint Online:

  • CustomizeCss

SharePoint REST Interface

SharePoint Online also includes a Representational State Transfer (REST) interface that provides access to lists and libraries as a relational data service. A core concept of any RESTful interface is the resource, and in SharePoint Online, lists and items are represented as HTTP resources that can be addressed by remote URLs.

Operations in the SharePoint REST interface constitute a standard set of operations for RESTful web services. Read, Create, Update, and Delete operations are mapped directly to GET, POST, PUT, and DELETE HTTP verbs, which eliminates the need for intermediate layers between client and server.

The REST interface uses flexible URL conventions for querying data, which enable you to filter, sort, and select information from SharePoint lists directly from the browser. You can also retrieve information from SharePoint lists through multiple representations, including support for JSON, Atom, and AtomPub standards.

For more information, including example URLs that implement the REST interface, see SharePoint Foundation REST Interface.

Developers can also access the Excel Services REST API in SharePoint Online. This API enables developers to access workbook parts or elements directly through a URL. This allows for a flexible, secure, and simpler mechanism to access and manipulate Excel Services content.

The discovery mechanisms built into the Excel Services REST API also enable developers and users to explore the content of the workbook manually or programmatically by supplying an Atom feed that contains information about the elements that reside in a specific workbook. Some examples of the resources that you can access through the REST API are charts, PivotTables, and tables.

Using the Atom feed provided by the REST API is an easier way to get to the data that you care about. The feed contains traversable elements that enable any piece of code to discover what elements exist in a workbook.

For more information, see Excel Services REST API.

Comparison of SharePoint Online Features and SharePoint Server Features

The following table lists the developer features available in SharePoint Online, as compared to those available in SharePoint Server 2010.

Table 2. Developer Features Comparison: SharePoint Online and SharePoint Server 2010

Feature SharePoint Online SharePoint Server 2010 (on-premises)
Browser Configuration Available Available
SharePoint Designer customization Create data-rich interfacesManage business processes through workflow

Connect to data inside and outside of SharePoint

Design and brand

Create data-rich interfacesManage business processes through workflow

Connect to data inside and outside of SharePoint

Design and brand

Business Connectivity Services

SharePoint Solutions sandboxed solutions Farm solutionssandboxed solutions
Client Object Models Silverlight.NET Framework managed

ECMAScript

Silverlight.NET Framework managed

ECMAScript

Silverlight Web Part Available Available
Web services Subset of .NET SharePoint web servicesREST API

Excel Services REST API

All .NET SharePoint web servicesREST API

Excel Services REST API

InfoPath Forms sandboxed solutions forms sandboxed solutions formsAdministrative forms
Workflow Declarativesandboxed solutions workflow activities Declarativesandboxed solutions and farm workflow activities

Conclusion

SharePoint Online provides a compelling and flexible option for companies that want the powerful collaborative platform of SharePoint, without the operational costs that come with hosting software on-premises. And it delivers a robust, flexible development surface for developers.

This article provides a brief overview of the development options available to developers in SharePoint Online. For more information about a particular area, follow the links in this article. Also, visit the SharePoint Online Developer Resource Center frequently for updated links to more resources, including articles, training, and videos.

Additional Resources

For more information, see the following resources:

SharePoint Designer Resources

Sandboxed Solution Resources

Client Object Model Resources