Installing SharePoint 2010 in Windows 7 (64 bit)

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. No need to worry, 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:

	<Package Id="sts">
		<Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes"/>
	<DATADIR Value="%CommonProgramFiles%\Microsoft Shared\Web ServerExtensions\14\Data" />
	<Package Id="spswfe">
		<Setting Id="SETUPCALLED" Value="1"/>

	<Logging Type="verbose" Path="%temp%" Template="SharePoint Server Setup(*).log"/>
	<!--<PIDKEY Value="Enter Product Key Here" />-->
	<Setting Id="USINGUIINSTALLMODE" Value="1"/>
	<Setting Id="SETUPTYPE" Value="CLEAN_INSTALL"/>
	<Setting Id="SETUP_REBOOT" Value="Never"/>
	<Setting Id="AllowWindowsClientInstall" Value="True"/>

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.


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 one.

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.

2. Exception in Database Configuration step:  An exception oftype Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Failed to call GetTypes on assembly Microsoft.Office.Server.Search, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Could not load file or assembly ‘System.Web.DataVisualition, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

Sol: The reason of this exception is the configuration doesn’t find the Chart Controls. Download it and install and re-run the configuration.

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


Validation in SharePoint 2010

Validation in SharePoint 2010

Most of the developers faced issues with column validations in SharePoint 2003/2007. It is really painful to write the validation using custom approach like JavaScript or jQuery (I don’t know how to do this one :().  SharePoint 2010 provides the following validations in Out of the Box. Items cannot be saved until these validation criteria are met and custom messages, which can be set for specific validation failure cases, are displayed to the user.

  • Column Level Validation
  • List Level Validation

1. Column Level Validation

We are already familiar with some sort of validation in column level; Date and Time field doesn’t allow us to input general text; Number doesn’t allow us to input text value, moreover, we can set range of the valid values (Max, Min).

Somewhat similar, Column Validation is the new feature of SharePoint 2010 which allows user to validate the input against the validation formula.

Fig: Validation formula and custom user message

Formula language of MS Excel is used as formula syntax.  If Formula is empty (No matter User message exist or not) there will not be any validation. User can customize formula as he wants. The default validation failure message may vary according to the data type: The validation formula has evaluated to an error, Column Validation Failed etc. However, we can modify this message. For example if we have a Text type column and which can contain only countries participating in the world cup, then using column validation we can obligate user to put only permitted value.

Validation Failure

Fig: Validation failure message

We can put validation on the built-in column also but remember that no all column type support column validation. Supported column types are: Single Line of Text, Choice (single), Number, Currency and Date and Time.

Note that, if we define a validation on site level, then any list using that column will contain same validation.

Enforce Unique Values

This is new feature in SharePoint 2010 as seems to be the part of Column Validation. It obligate user to input unique value for that particular list through folder also.

Enforcing Validation

Fig: Setting Enforce Unique Values

Attempt to add duplicate entry for that column results an error message “This value already exists in the list.”

Field type those support this features are: Single line of text, Number, Currency, Date and Time, Choice (single), Lookup (single) and Managed Metadata (single).

If we attempt to set this property for a field in the list without uniqueness in that field, SharePoint will show an error message.

Enforce Unique Values setting error

Fig: Enforce Unique Values setting error

Object Model

SPField.ValidationEcmaScript -> Read only.  Gets an ECMAScript function that corresponds to the field’s validation formula.

SPField.ValidationFormula -> Indicates the formula referenced by the field and is evaluated when a list item is added or updated. This is our actual formula which we write while creating validation.

SPField.ValidationMessage-> Gets or sets a message to display to the user if validation fails for this field.

SPField.EnforceUniqueValues-> Gets or sets a Boolean value that specifies whether to enforce uniqueness in column values. The default is false.


Field Schema Changes

New node <Validation> is added in Field schema if a column has a validation. It contains the user message in ‘Message’ attribute. ‘Script’ attribute will be available and contains Ecma Script of validation formula if it is not default (Default Ecma script for each field is function(x) {return 1}). And it contains the formula text as <Validation> value.


<Field DisplayName=”PNumber” Required=”FALSE” EnforceUniqueValues=”FALSE” Indexed=”FALSE” SourceID=”{58315844-0c36-4fee-aa99-f254cfc40b9e}” StaticName=”PNumber” ColName=”float1″ RowOrdinal=”0″ Percentage=”FALSE” Version=”2“><Validation Message=”Must be greater than 100.” Script=”function(x) {return SP.Exp.Calc.valid (SP.Exp.Node.f (‘GT’,[SP.Exp.Node.a(0),SP.Exp.Node.v(100)]),x)}”>=PNumber&gt;100</Validation></Field>

2. List Validation

This is another sort of validation which is directly related to list. Main advantage of this validation is; we can use different columns at a time to build our validation formula. For e.g. we obligate two columns to have equal value.  Syntax and Field Type supporting validation is same as in column validation.  Default message ‘List Item Validation Failed’ will be displayed on the case of validation failure. However, we can change this message.

List validation setting

Fig: List validation setting

Now when user doesn’t meet the criteria of above validation, we get the custom user message as shown below

Validation failure (list and column)

Fig: Validation failure (list and column)

Unlike column validation where error is thrown by SharePoint, we will get our own validation failure message in library.

Object Model

SPList.ValidationFormula-> Gets or sets a formula that is evaluated each time that a list item is added or updated. String must be of length less than 1024.

SPList.ValidationMessage-> Gets or sets the message that is displayed when validation fails for a list item. The maximum length of a validation message string is 1024.

More info:


Two new nodes  are added in the List Schema; <Validation> with an attribute ‘Message’ which contains user message if any and validation formula as value; <ValidationDisplayNames> node which contains validation formula as value.


<?xml version=”1.0″ encoding=”utf-16″?>

<List DocTemplateUrl=”” DefaultViewUrl=”” MobileDefaultViewUrl=”” ID=”{D6B41E9F-3DB4-40A2-8CD6-A2999E218C98}” Title=”PCustomList” Description=”” ImageUrl=”/_layouts/images/itgen.png” Name=”{D6B41E9F-3DB4-40A2-8CD6-A2999E218C98}” BaseType=”0″ FeatureId=”{00BFEA71-DE22-43B2-A848-C05709900100}” ServerTemplate=”100″ ……>

<Validation Message=”PNumber must be greater than 100″>=PNumber&gt;100</Validation>



<Field ID……….

SPListDataValidationException Object Model

SPListDataValidationException->The exception that is thrown when data for a list field or list item fails validation.

ErrorCode->Gets an integer that identifies the exception. (Inherited from SPException.)

ItemFailure->Gets an SPListDataValidationException.SPFailure object that contains information about a list item validation failure.

FieldFailures->Gets a collection of SPListDataValidationException.SPFailure objects that contain information about field validation failures.

For more information refer:


  • Column validation doesn’t use regular expression; it may not feasible in all cases requiring validation. For example, if we need the Text type column which accepts only GUID, then it may be irritating or impossible to create such validation.
  • · There is not IntelliSense as in Microsoft Excel. So, it is somewhat tedious to write validation formula.
  • A validation formula at the column level cannot include any other columns besides itself.  For example, [Column1]>[Column2] is an invalid formula and SharePoint will not allow it to be used at the column level.  In this case, you want to use list-level validation. The column validation could be used only to compare with static and defined values e.g. checking if it is greater than the current date etc.
  • Sometimes, it may happen that even there is no formula error and custom user message, SharePoint displays its own default message. This is because of inappropriate formula (which might be always false).
  • When there is validation failure in document library, it will give SharePoint error rather than displaying our custom (OR default) message. Note that this issue exists in OM also. This seems to fix on official release of SharePoint 2010.

Column validation failure message in document library

Fig 3: Column validation failure message in document library

  • For List validation, we can write only one validation formula.
    • What if the column and list level validations are in conflict?  Example – at the list level, you require that [Text1] = [Text2], but each column has its own validation; [Text1]=”AAA”, and [Text2] =”BBB”. In this case, it will be impossible to actually submit a list item.  The column validations are evaluated first, but if the values validate here, they will of course fail the list validation.


Conflicts and Resolution on SharePoint

  • What if the list level validation includes columns not included in a particular content type? If a column used in the list formula isn’t available in the current content type, validation will always fail.  This means that if you have multiple content types in your list, you should not validate at the list level for a column that is not included in all content types on the list.  These columns can only be validated at the column level.
  • What if you have both column level validation and list level validation? The column level formulas will be evaluated first, then the list formulas

List Template Id’s and Base Type

Microsoft SharePoint List template and their List Id.
  1. 100   Generic list
  2. 101   Document library
  3. 102   Survey
  4. 103   Links list
  5. 104   Announcements list
  6. 105   Contacts list
  7. 106   Events list
  8. 107   Tasks list
  9. 108   Discussion board
  10. 109   Picture library
  11. 110   Data sources
  12. 111   Site template gallery
  13. 112   User Information list
  14. 113   Web Part gallery
  15. 114   List template gallery
  16. 115   XML Form library
  17. 116   Master pages gallery
  18. 117   No-Code Workflows
  19. 118   Custom Workflow Process
  20. 119   Wiki Page library
  21. 120   Custom grid for a list
  22. 130   Data Connection library
  23. 140   Workflow History
  24. 150   Gantt Tasks list
  25. 200   Meeting Series list
  26. 201   Meeting Agenda list
  27. 202   Meeting Attendees list
  28. 204   Meeting Decisions list
  29. 207   Meeting Objectives list
  30. 210   Meeting text box
  31. 211   Meeting Things To Bring list
  32. 212   Meeting Workspace Pages list
  33. 301   Blog Posts list
  34. 302   Blog Comments list
  35. 303   Blog Categories list
  36. 1100  Issue tracking
  37. 1200  Administrator tasks list

Base Type Values:

0   Lists

1   Document libraries

3   Discussion boards. Does not support custom view styles.

4   Surveys. Does not support custom views or view styles.

Sharepoint subsite with urlname ‘images’, ‘m’, ‘lists’, ‘IWConvertedForms’ etc

In sharepoint, if we try to create subsite with urlname ‘images’, ‘m’, ‘lists’, ‘IWConvertedForm’ etc. Some of them are SharePoint reserved name. (These names are not the name of list like ‘Document Library’, ‘Calender’ etc), it doesn’t allow us to create. This is because these all folders already exist under RootFolder of web.

Programmatically this lists can be extracted as

public string[] GetAllSubFoldersFromRootFolder(string spSite)
using (SPWeb spWeb = new SPSite(spSite).OpenWeb())
if (spWeb == null)
return null;
if (spWeb.RootFolder == null)
return null;
string[] folderNames = null;
for (int i = 0; i < spWeb.RootFolder.SubFolders.Count; i++)
folderNames[i] = spWeb.RootFolder.SubFolders[i].Name;
return folderNames;
return null;

‘Self – Service Site Creation’ in SharePoint 2003

First of all ‘Self-Service Site Creation’ service is available only for WSS 2.0 top level site in ‘/’ not for Portal Site. So this right is only visible in WSS 2.0 top level site in ‘/’ but not in Portal site even service is enabled.

We cannot use ‘Self-Service Site Creation’ for the Portal site like ‘http://server:Port/ default.aspx’ even it is top level site in path ‘/’. It must be WSS site. And more important is for PORTAL sites like ‘http://server:Port/default.aspx’, there is no meaning of Enabling/Disabling ‘Self-Service Site Creation’. There will be no facility and NO RIGHTS about ‘Self-Service Site Creation’ available in RIGHTS list UI. Programmatically, this can be verified by reading PermissionMask of the group we created and ANDing with individual RIGHTS.

‘Self-Service Site Creation’ is the Site RIGHTS and will be available in UI only for the Top-Level WSS Site in ‘/’ (E.g. ‘http://server:Port/default.aspx’) where it was enabled. When it is enabled, there an announcement will be added to the Announcements list on the home page of the top-level Web site. The announcement will provide a link to the site creation page (scsignup.aspx in the _layouts directory).

Among default five groups: Reader, Contributor, Web Designer, Administrator and Guest (Invisible in UI), by default it is enabled for all groups expect Guest. However, we can enable/disable later for Reader, Contributor and Web Designer (AND any group we added) if site support this feature. However for others Portals also, Permission Mask is same for default groups as WSS 2.0.

Sharepoint subsite with urlname ‘images’, ‘m’, ‘lists’, ‘IWConvertedForms’ etc

In sharepoint, if we try to create subsite with urlname ‘images’, ‘m’, ‘lists’, ‘IWConvertedForm’ etc. Some of them are SharePoint reserved name. (These names are not the name of list like ‘Document Library’, ‘Calender’ etc), it doesn’t allow us to create. This is because these all folders already exist under RootFolder of web.

Programmatically this lists can be extracted as

public string[] GetAllSubFoldersFromRootFolder(string spSite)




using (SPWeb spWeb = new SPSite(spSite).OpenWeb())


if (spWeb == null)

return null;

if (spWeb.RootFolder == null)

return null;

string[] folderNames = null;

for (int i = 0; i < spWeb.RootFolder.SubFolders.Count; i++)


folderNames[i] = spWeb.RootFolder.SubFolders[i].Name;


return folderNames;





return null;




Using ‘SharePoint Manager’ we can view these folders in GUI.