Monday, November 30, 2009

Install SharePoint 2010 on Windows 7(64-bit):


SharePoint 2010 provide functionality to install SharePoint 2010 on Windows7. Follow these steps to install on Windows7(64-bit):

1.      Install SQL Express 2008 from "”

2.     Download SharePoint 2010 Beta from Copy the exe to the folder C:\SharePointFiles

3.      Open Command prompt and run

c:\SharePointFiles\ en_sharepoint_server_2010_beta_x64_x16-19249.exe /extract:c:\SharePointFiles

4.      Open the file using notepad “c:\SharePointFiles\files\Setup\config.xml”

5.      Add <Setting Id="AllowWindowsClientInstall" Value="True"/> to the Configuration section

6.      Install the Filter Pack from C:\SharePointFiles\PrerequisiteInstallerFiles\FilterPack\ FilterPack.msi

7.      Install the following softwares:


8.      Run following command to Install Windows Features(IIS and other related)


start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;













9.      Run “c:\SharePointFiles\Setup.exe” to install SharePoint

10.   On “Choose the installation you want page”, click Standalone

11.   Choose default settings and complete the installation

12.   Now, run RegEdit and browse to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS”

13.   Change “ServerRole” value from SINGLESERVER to WFE

14.   Start the “the SharePoint Products and Technologies Configuration Wizard” and follow the steps to install SharePoint 2010

Thursday, November 26, 2009

Sandboxed Solution in SharePoint 2010


SharePoint 2010 comes with a great feature – Sandboxed Solution. This is type of solution which could be deployed to a site by a site administrator. A site administrator don’t need to be a farm administrator to deploy the solution. The solution have full access to the site where it is deployed but limited to other sites and resources for security reason.

This would be ideal for SharePoint Online services where you could create multiple sites and give user permission to manage and upload custom code to their site without needing assistance from farm administrator

To create a sandboxed solutions:

  1. Create a new SharePoint project in VS 2010
  2. On SharePoint Customisation Wizard, enter your Site URL. Select “Deploy as a sandboxed solution” as trust level
  3. Click Finish and start adding your artifacts to the project
  4. Build the solution and create WSP package
  5. Browse to your site
  6. Open Site Actions – Site Settings
  7. Under the Galleries section, select solutions
  8. On the Solution page, upload the solution


Now, you could add your artifacts(web parts, activate features) specific to your site

Safe List object from SPWeb in SharePoint 2010


If MOSS 2007, the code to read the list object use to be

SPWeb web;
SPList list = null;
list = web.Lists[“Pages”] }
catch(Exception ex)
// List not found

The reason to have a try-catch was because SharePoint would throw an exception if the list does not exist

Glad to see that in SharePoint 2010, this issue is fixed. The code in SharePoint 2010, would be

SPWeb web;
SPList list = web.Lists.TryGetList(“Pages”)

TryGetList returns the list with the specified title from the list collection, but returns null if its not found. No more more error handling is required

Monday, November 23, 2009

Using Linq To SharePoint in 2010


SharePoint 2010 comes with SpMetal tool that auto-generate entity types based on a list definition. It uses the SharePoint Lists web service to get the schema of a list.

This tool is located at c:\program files\common files\microsoft shared\web server extensions\14\bin

The syntax is

spmetal.exe /web:SITE-URL /namespace:YOUR_NAMESPACE /code:CLassName.cs

Microsoft.Sharepoint.Linq Assembly


This is not installed in GAC and hence would not be visible in .NET assembly tab when adding a new reference to project. This is located under at “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI”

Data View Web Part in SharePoint 2010


This web part have been replaced by XSLT List View Web part in SharePoint 2010. The old Data View Web part is still supported in SharePoint 2010 but not recommended to use.

Developer Dashboard in SharePoint 2010


SharePoint 2010 comes up with great tool to check the performance and process steps(same like ASP.NET trace). This would enable the following information to be displayed:

· The SQL queries they have and their timings.
· Web Part Events Offsets for testing performance against custom web parts.
· Trace information, usually only found in the ULS logs, now available on the page.
· A tree view of all controls on the page.
· Session and Cookie information

To enable it, follow these steps:

  • Enable Developer Dashboard- Run this command “stsadm.exe" -o setproperty -pn developer-dashboard -pv OnDemand”
  • Do IISReset
  • Activate Developer dashboard by clicking on the icon in the top right corner of the browser window of your site
  • This will refresh the browser and display the tool bar at the bottom of the page. Click on the Show or hide additional tracing information link at the bottom for detail trace information

Friday, November 20, 2009

Update Parent Content Type


When you update a parent content type, the following consideration need to be taken account:

  1. Settings of child content type column would be overridden by setting of parent content type column
  2. If you make some changes in parent content type and don’t push them down to child content type, these changes would not be pushed to child content type on later stage.
  3. If you delete any column in child content type, they are not created again when you push changes from Parent content type
  4. Read-only and Sealed child content type will not be updated and an error would raise

Error “Attempting to load a 64-bit application, however this CPU is not compatible with 64-bit mode"


This error occurs when you are trying to create a 64 Bit operating system VMware.

To fix this, restart your machine and enter your system BIOS. Look for Virtualization property and enable it. This is disabled by default.

Installing SharePoint 2010 on Microsoft Virtual PC


You can't install SharePoint 2010 on Microsoft Virtual PC as it needs 64 bit Platform. As of now, Microsoft Virtual PC don’t support 64 bit operating system guest.

To overcome, you need to use VMWARE as Windows 2008 64 Bit could be installed on VMware Client.

Upgrade Vista 32 Bit to 64 Bit Windows 7


If you try to install Windows 7 64-bit on 32-bit Vista, the following error would occur:

The Version of this file is not compatible with the version of Windows you're running.

The issue is you can’t do a direct in-pace upgrade from 32-bit to 64-bit Windows 7. The only way to do a clean install. Follow the below steps:

  1. Backup manual data from your machine
  2. Backup the application settings and user documents\pictures etc using Windows Easy Transfer(
  3. Create a bootable DVD or USB using Windows 7 USB/DVD Download tool(
  4. Restart the machine and access BIOS(using F12 or other key as per your machine). Change the Boot sequence to use DVD\USB as the first option
  5. Restart the machine, Windows7 setup should start now
  6. Select “Custom” installation option and follow the instructions
  7. Install and activate Windows 7

Enjoy the wonderful experience of Windows 7

Tuesday, November 17, 2009

Update SharePoint List LookUp field

To update a lookup field in SharePoint, you need to use SPFieldLookupValue constructor

The format is

Item[“LookupField”] = new SPFieldLookupValue(ITEM_ID, ITEM_TITLE);

Create a blank page in Pages Library

You need to perform these steps:

Get a blank page from file system or using the below function

StringBuilder sb = new StringBuilder();
sb.Append("<%@ Page Inherits=\"Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,");
sb.Append("Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c\" %> <%@ Reference VirtualPath=\"~TemplatePageUrl\" ");
sb.Append("%> <%@ Reference VirtualPath=\"~masterurl/custom.master\" %><html xmlns:mso=\"urn:schemas-microsoft-com:office:office\" ");
sb.Append("xmlns:msdt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\"><head>&nbsp;<!--[if gte mso 9]><xml>");
sb.Append("<mso:CustomDocumentProperties><mso:PublishingContact msdt:dt=\"string\">1218</mso:PublishingContact>");
sb.Append("<mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_PublishingContact ");
sb.Append("<mso:PublishingContactPicture msdt:dt=\"string\"></mso:PublishingContactPicture>");
sb.Append("<mso:PublishingContactName msdt:dt=\"string\"></mso:PublishingContactName>");
sb.Append("<mso:ContentTypeId msdt:dt=\"string\">0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064");
sb.Append("<mso:Comments msdt:dt=\"string\"></mso:Comments>");
sb.Append("<mso:PublishingContactEmail msdt:dt=\"string\"></mso:PublishingContactEmail>");
sb.Append("<mso:PublishingPageLayout msdt:dt=\"string\">/_catalogs/masterpage/BlankWebPartPage.aspx, ");
sb.Append("Blank Web Part Page</mso:PublishingPageLayout>");
Byte[] blankPage = ASCIIEncoding().GetBytes(sb.ToString());


Now, add this blank page to the Pages Library

SPList list = web.Lists["Pages"];

SPFile file= list.RootFolder.Files.Add(“blankpage.aspx”, blankPage);

Monday, November 16, 2009

SharePoint Online

This comes in two offerings:

Standard Offering

Dedicated Offering

Multiple customers share a common infrastructure

Each customer has its own infrastructure

Customer priority: rapid deployment

Customer priority: heavy customization

No lower seat limit

For customers with more than 5000 seats

Cost efficiency optimized for customers with up to 20,000 users

Optimized for customers with 20,000+ users

The dedicated offering support custom code including SharePoint Packages

For developing on SharePoint Online Services, check this white paper which describes the customization (or extensibility) capabilities that are supported with the Standard offering of SharePoint Online-

Microsoft SharePoint Online Standard Developer Guide (

Microsoft Online Services

Seeing the prospect and future in cloud computing, Microsoft have moved rapidly in BPOS(Business Productivity Online Suite). This Suite contains of:

  • SharePoint Online
  • Exchange Online
  • Office Communicator Online
  • Office Live meeting

The next product to add to this suite would be Dynamics CRM. Having SharePoint online using Microsoft Live services is a great initiate as this would help to target small to medium customer. These customer who wants to have a presence on web would vastly benefit from this cost effective, secure and reliable server.

For more details check and try 30 days trial

Follow the Microsoft Online Service team on their blog at