Sharing SharePoint Knowledge

Technical Solutions for SharePoint Server 2010

VMware Player Easy Install – Windows Server 2008 R2 Installation Issue

Posted by Chandrasekaran C N on August 30, 2010


Hi All,

This post might not be related to SharePoint Server, but it is likely related to Windows Server 2008 R2 installation on virtual image. Today I decided to install SharePoint Server 2010 on the virtual machine. So, I used VMware Player 3.0 to create a new virtual image.

In VMware Player 3.0, there is an option to install guest operating system while creating a new virtual image i.e., Easy Install Option. I had given the ISO image of Windows Server 2008 R2 in the Create Virtual Image wizard and configure other necessary settings in the wizard like windows product key, user credentials, etc.,

Once all settings are completed the guest OS is started installing on the virtual image. During installation, an error occurred as shown below

UnattendedAnswerVMware displayed an alert saying that “an unattended answer file contains invalid product key and it has to be remove or enter proper product key. But, I have entered correct product key in the wizard, still VMware displayed this alert message and I could not proceed further.

Even, I tried by creating a brand new virtual image, but no luck, still I got the same alert message. So, I started google-ing and found out the solution,

The solution was we need to disable the floppy drive, since it points out a file namely “autoinst.flp” but there is no floppy drive installed on the system. So, I disabled the floppy drive and installation happened successfully.


Chandrasekaran C N


Posted in VMware Player, Windows Server 2008 | Tagged: , , | Leave a Comment »

Creating Custom Document ID in SharePoint Server 2010

Posted by Chandrasekaran C N on August 14, 2010


Hi All,       

One of the new and exciting features of SharePoint Server 2010 is “Document ID Service”.       

What is Document ID Service and why it is important ?      

Document ID Service facilitates the users with the following functionalities       

  • Generate a unique ID to each documents in the docment library
  • Enable the users to search the documents using unique ID
  • Create custom document ID by extending the document ID provider

Many enterprise organizations require this feature, because they have a huge volume of documents to be managed and it is difficult to search  the documents as those documents are stored in different site collections.  Using Document ID feature, users can able to search the document anywhere in SharePoint using the unique document ID.      

Let’s walkthrough on how to enable the Document ID Service and to create a custom Document ID Service.       

Document ID Service is a site collection feature and it is not activated by default. So, first if we want to use the document ID feature, we need to activate that feature.       

Go to Site Settings -> Site Collection Features -> Document ID Service and click to activate button to activate.       

Document ID Service Feature Activation

Once the Document ID Service feature is activated,        

Go to Site Settings -> Go to Site Collection Administration Section -> Select Document ID Settings link       

Document ID Service Settings

In the above diagram, we can give a static value, which will be the unique document ID for the documents. These static value will be suffixed by an integer and for each document the integer value will be increased by one as shown in the below diagram.      

Generated unique document ID for documents

Using out-of-the-box feature, we can only provide some static value as unique document ID for all documents. But, this might not use for all the scenarios. We might need the unique ID’s generated dynamically based on some logic like current datetime, combination of document metadata, etc.,  To fulfill these scenarios, we can extend the OOTB document ID provider and create our own custom document ID provider.       

In order to create custom document ID provider, we need to use “Microsoft.Office.DocumentManagement” assembly, which is available only in SharePoint Server Standard license and above.       

Creation of Custom Document ID :-      

To create the custom document ID provider, open up the favorite Visual Studio 2010 IDE and select Empty SharePoint Project. Make sure that you have selected the .NET Framework 3.5 version and not .NET Framework 4.0 version.      

Right click the Features folder and add a feature called “CustomDocumentIDService” and provide appropriate title and description for the feature. Finally, change the scope of the feature to Site. After creating a feature, right the click the feature and add a feature receiver as shown in the below diagram       

Visual Studio Solution for Custom Document ID Provider

In order to create custom document ID provider, we need to implement an abstract class namely “DocumentIDProvider”, which provides the following methods and property    

GenerateDocumentID  GenerateDocumentId method is used to do our logic on generating the custom document ID. It consists of a single input parameter SPListItem, so that we can generate the document ID based on the metadata of the SPListItem. 

GetDocumentUrlsById  This method is used to implement a custom search and returns an array of URLs that point to the documents. This method is used in conjunction with DoCustomSearchBeforeDefaultSearch property. When this property is true, this method is called before default SharePoint search and returns the array of string of URLs. If the property is false, first the default SharePoint search called, if it does not return any value, then it executes this method to return the string of URLs.

GetSampleDocumentIdText This method is used to set the default document id

DoCustomSearchBeforeDefaultSearch Returns either true or false, if true, the GetDocumentUrlsById() method called before default SharePoint search happens , otherwise, default SharePoint search executes, if no result returns, it will call the GetDocumentUrlsById() method. 

In this sample, we will generate the unique document ID as “CustomDocID” and suffixed with the current date & time. Here is the code that generates the unique document ID

Custom Document ID Provider

 Once the generation logic is defined, we need to set custom document ID provider to the site collection, to do this, we need to have a feature receiver class as shown below



In the above code, SetProvider() method to set the custom document ID provider and SetDefaultProvider() method to revert back to default document ID Provider. After successful deployment of the custom document ID provider, below screen shows custom document ID feature

Custom Document ID Provider Feature

Once this feature is activated, the default document ID provider is disabled and SharePoint identified that there is a custom document ID provider installed by displaying the message on the Document ID Settings page

Custom Document ID Provider

This message shows that the custom document ID provider installed successfully. Hereafter,  every document that is uploading in this site collection will have the custom document ID.

Custom Document ID Provider assigned to the documents


Chandrasekaran C N

Posted in Document ID Provider, SharePoint 2010 | Tagged: , | 2 Comments »

Free eBook – SharePoint Server 2010 Installation and Configuration

Posted by Chandrasekaran C N on August 13, 2010

Hi All,

A free ebook available on how to install and configure SharePoint Server 2010. This ebook explains all the steps involved in installing and configuring SharePoint Server 2010. A must guide for all who needs to install and configure SharePoint Server 2010 from scratch.

Chandrasekaran C N

Posted in Book, SharePoint 2010 | Tagged: , | Leave a Comment »

Free Webinar – Best Practices for Upgrading to SharePoint 2010

Posted by Chandrasekaran C N on August 9, 2010

Hi All,

Check out a free webinar on upgrading to SharePoint 2010 best practices presented by Joel Oleson, Dux Raymond Sy.

Overview of the webinar are as follows:

  • Properly plan, budget, manage and control the SharePoint 2010 migration project
  • Prepare yourself for SharePoint and Office 2010 by archiving, cleaning up, and considering the move to 64-bit
  • Evaluate which upgrade method that’s appropriate for your environment
  • Consider upgrade development and customization options
  • Determine what not to migrate to SharePoint 2010
  • Upgrade from SharePoint 2003

When: Friday, 20th August 2010
Where: Virtual Event
Timings: 10:00 am to 11:00 am PST
                  06:00 pm to 07:00 pm GMT
                  10:30 pm to 11:30 pm IST

Chandrasekaran C N

Posted in SharePoint 2010, Uncategorized, Upgrade to SPS2010, Webinar | Tagged: , | Leave a Comment »

Inside Microsoft SharePoint Server 2010 – Book Excerpts

Posted by Chandrasekaran C N on August 2, 2010

Hi All,

The first four chapters of Inside Microsoft SharePoint Server 2010 is available on MSDN.

Chapter 1 : SharePoint 2010 Developer Roadmap
Chapter 2: SharePoint Foundation Development
Chapter 3: SharePoint Developer Tools in Microsoft Visual Studio 2010
Chapter 4: Sandboxed Solutions

To pre-order this book, visit Amazon site.

Happy Reading 🙂

Chandrasekaran C N

Posted in Book, SharePoint 2010 | Tagged: , | Leave a Comment »