Friday, December 4, 2009

Fixing UserProfileException while installing SharePoint Server 2010

  1. Microsoft.Office.Server.UserProfiles.UserProfileException

    The request channel timed out while waiting for a reply after 00:00:18.7285970.
    Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding.

    One of the clear exception which says what to do while installing the beta product

    Navigate to the following path and open the client.config file \14\WebClients\Profile\client.config

  2. Find the tag increase the default sendTiemout attribute value to few minutes instead of seconds sendTimeout="00:15:20"

  3. Rerun the Psconfig wizard

After a long struggle managed to deploy SharePoint 2010 in a Vmware dev environment

Wednesday, December 2, 2009

VirtualBox memory limitation plays spoilsport in Sharepoint 2010 installation

As a believer of virtualized development environment, I've started building the development environment for SharePoint 2010 using Sun Virtualbox. I've shared initially 1 GB of Ram out of 4 GB from my 32 Bit Vista host which eventually fell short after installing the Pre-requisites of SharePoint 2010

After facing a lot of screen freezes and high memory consumption in my guest (Windows Server 2008 SP1) I've increased the shared memory to 1.50 GB. SharePoint 2010's psconfig proved that is too low after 8 of 10th step throwing a WCF timeout exception. No luck even after relaxing the timeout values ,not able to complete psconfig and not able to pull down the processor/memory consumption

Frozen VirtualBox

So SharePoint 2010 requires more memory to be shared in its virtualized environment, there comes the issue. There's no way to increase the shared memory beyond 1500 MB with my current hardware setup(32 bit Vista Home premium with 4 GB RAM)

This limitation is forcing me to evaluate using VMware, so for the time being good bye for the cross platform hypervisor Virtualbox

Top memory comparison with VMWare

Friday, November 20, 2009

How to share files in Sun Virtual Box ?

Shared folders allow you to access files of your host system from within the guest system, much like ordinary shares on Windows networks Sharing folders in Microsoft virtual PC is much simpler than in virtual Box. Just adding the shared folder will add a new mapped icon in "my computer" to provide access to host files

This is not the case in Virtual box, sharing is accomplished using a special service on the host and a file system driver for the guest, both of which are provided by VirtualBox.To share a host folder with a virtual machine in Virtual Box, you must specify the path of that folder and choose for it a "share name" that the guest can use to access it.

After this step I'm expecting a new drive in "My Computer" as a typical Microsoft Virtual PC user. But there is no new drive. After digging into the help files, Virtual Box requires a explicit "net use" command to mount that shared drive.

net use x: \\vboxsvr\sharename

vboxsvr is a fixed name(might be helper service which runs on the guest along with Guest additions), "sharename" is the alias name which is provided while mapping the host drive

Virtual machine guest additions installation is a pre-requisite for folder sharing

Monday, November 16, 2009

Where is Windows Server 2008 SP1 ?

While preparing a Windows server 2008 virtual machine and as usual I was just looking up for patching my newly installed operating system(to get the bug fixes).

Interestingly I was not able to find Windows Server 2008 SP1, there is only SP2 available and came to know that the initial OS installation includes the SP1.

FAQ Section of Windows Server 2008 SP1 clarifies the doubt,Following text taken from the FAQ

Are there any prerequisites for SP2?

You must have Windows Vista with SP1 or Windows Server 2008 installed on your computer before installing Service Pack 2. (Windows Server 2008 shipped with Service Pack 1 included.)

Screen shot after the clean installation of Windows server 2008

SharePoint server 2010 preparation

As SharePoint server runs only on 64 bit platform, all working virtual machines becomes useless and need to start with a clean slate. It's time to build a new virtual machine but unfortunately our Microsoft Virtual PC cannot be able to run 64 bit machine within.

SharePoint server 2010 can be installed on Vista/Windows 7/ Windows 2008 Server Operating systems. So it's a clear message from Microsoft that Virtual PC will not be upgraded to support 64 bit instances. Either run SharePoint on your desktop or go for third party virtualization solutions such as Vmware or Sun Virtual box. As the later is a free offer from Sun Micro, I prefer to go with Virtual box.

Prior to that you need to check whether you lap/desk top supports 64 bit virtualization. Use VMware 64 bit Compatibility checking tool and find out whether your hardware supports 64 bit virtualization. Use this processor check guide from Vmware for supported micro processors.

At last Sun virtual Box rocked by hosting the 64 bit guest on a 32 bit Vista box

It's time to learn new things right now which are integrated right into the heart of SharePoint 2010 till I get the CTP edition from MSDN.

Things are which are new in SharePoint 2010
  • PowerShell - an ultimate scripting engine which will surely replace the STSADM management console from administrators
  • Jquery - A lightweight javascript library which comes with OOB product
  • SilverLight - Version 3.0 looks much solid with its new controls and RIA services
  • Windows Communication foundation - Guy who replaces the SSP in MOSS
  • Visual Studio 2010 - Recommended IDE for SharePoint server 2010 which comes with tight integration like F5 execution and much better project templates than VseWss extensions. Still I need to explore more

Monday, October 12, 2009

C# vs Objective C

Got a chance to mess with Objective C and Cocoa framework. Following are some typical thoughts when comparing with C# and .NET framework

• In Objective C keyword "self" is used instead of "this" of C#
• Memory allocation happens through "alloc", there is no "New" keyword in Objective C
• There is no Garbage Collector to collect objects out of scope, proper release/disposal of resources is essential in Objective C.
• Header files are imported instead of include (i.e #import statements are used instead of traditional #include statements)
• The spec of a class is divided in two parts interface and implementation, interface portion contains declaration class, variables and related methods. This interface normally lives in .h files
• Implementation portion has the actual code for the methods declared in interfaces. This implementation normally stays in .m files. So all classes are like an C# interface and its implementation, declaration and actual code is segregated.
• A class declaration starts with @interface compiler directive and ends with @end directive.
• Object references are pointers. Objective C supports both strongly typing and weak typing. Strong typing always happen with pointer declaration
• There are two types of methods, Instance methods & Class methods, Instance methods require an instance of the class to initiate the call and Class methods are much similar to Static methods in C#
• An instance method is marked with the dash(-) as prefix before the return type and signature of the method.for e.g, -(void)Insertsome:id(anobject)
• An Class method is marked with the plus(+) as prefix before the return type and signature of the method.for e.g, +(void)Insertsome:id(anobject)
• NULL in C# becomes nil in Obj C
• Calling a method is known as messaging,a message is the method signature and its parameters. All messages are enclosed in square brackets [ and ]
• A property declaration starts with @property directive followed by data type and property name.( Eg:- @property BOOL flag;)
• @synthesize compiler directive is used to instruct the compiler to generate methods according to the specification in the declaration
• C# Interfaces are called as Protocols in Objective C
• .XIB files are used to store UI related settings, i.e., if we design a form using the IDE that will be stored as a xib file. In Apple world people still use the legacy name .nib file(that is the legacy name still in use)
• In Objective C a solution is called as a Bundle.

Wednesday, September 23, 2009

First look at Google Chrome's Frame

Are you willing to use Google chrome you don't have privileges to install the new browser. There might be the IT department which may block installing new applications. You might be a SharePoint guy using IE heavily for development related works and also using Google apps like Gmail, Google reader etc for personal things Are you one of them. Google comes up with Chrome Frame

There's a way to leverage Chrome's state-of-the art rendering engine within Internet explorer without installing Google Chrome. Again Google leverages the existing capability to give more comfort to its users just like what happened for XmlHttp object.

Google developed a IE plugin/addon to replace Microsoft's traditional Trident layout engine with Chrome's layout engine based upon Webkit. You can call this Chrome layout by adding the prefix of cf: before any url. For eg:- Google home page will be cf:

So as a web developer do you want to use the feature of Chrome which is not present in IE(for eg Canvas tags). You just need to add the following meta tag to you code

<meta http-equiv="X-UA-Compatible" content="chrome=1">

Google provides a Javascript code snippet to detect whether Chrome frame exists or not,if not then it will prompt the users to install the plugin

Google's Search home page in Frame

Google Frame's About page

This Frame project is still in its early stages so expect some buggy things too. Let's see how Microsoft handles this plugin in future.

Thursday, September 17, 2009

How to find the site template used on a Site ?

Some times I stumble upon some heavily modified sites to find out the site template(Team site/Blank site etc) used for provisioning that instance. That's quite easy using the object model but I wondered is it possible through some out-of-the box tool or UI's

Recently came across the WSS RPC methods It has a function called GetProjSchema which does this magic

Authenticate with the web application

Remove all strings after the site name from the address bar and append the following string


So if you have application as Foo and it has a site called PWA then the URL might be looking like this


GetProjSchema requests the CAML Schema for a Web site, this is a blend of ONET.XML for that specific site definition and some resources which are related to that provisioned site instance. This CAML schema is cached in IIS, so we've retrieved this cached version to find out the site template

This gives more details than required but we are now interested in the site template used, look at the first line "Project Title=". This is the current site template being used

A sample screen snap

Anything which comes OOTB capable of solving real world problems is good. Exploit the rendered CAML . .. .

Tuesday, September 1, 2009

SharePoint thesaurus files explained

Thesaurus files are used to tailor the search requests to serve a better search results to the end users. We can define multiple synonyms and patterns in thesaurus files

Where to Find the thesaurus files in my Web front end ?
C:\Program Files\Microsoft Office Servers\12.0\Data\Office Server\Applications\GUID\Config

Find TSneu.xml and open it in a editor, this is the language neutral thesaurus files which affects across the site. This file is commented out as an OOTB setting, uncomment this file before proceeding.

insert the following snippet in that file

<pat> laptop </pat>
<pat> notebook </pat>
<sub> Dell </sub>

This configuration explains that if a user searches with string "laptop" or "notebook" those strings were considered as "Dell" before triggering a search.

Restart the Office search service to apply thesaurus changes to the server.
NOTE: NO need for an IISReset or Crawling the content or Index reset just restart the search service

net stop OSearch
net start OSearch

when you search for "Dell" that will be highlighted(technically it is HitHighlightSummary) in the Search description text

When the search string is replaced/handled by a thesaurus in between(in our case it is laptop/notebook) then you cannot see any text as highlighted in its description

Thursday, August 27, 2009

Including quotes in verbatim strings

As we all know C# supports two types of strings: regular and verbatim strings. Escape sequence character such as backslash is not processed within this verbatim string sequence except quote-escape-sequence("). I recently stumbled across this C# basic string rule

So to encode a xml fragment like this

string s="[formbody xmlns=""][/formbody]"

We should have to write as follows using verbatim character and Quote escape sequence

string s = @"[FormBody xmlns=""""][/FormBody]";

but C# handles this quote-escape-character as regular escape sequence internally

So beware while using verbatim strings and escape sequences altogether especially in cases of handling XML/HTML strings in C# code

For more Check the C# language Specification

Monday, July 27, 2009

How to install Virtual Server 2005 in Windows Vista Home Premium

Disclaimer: This is an unsupported way of running Virtual Server 2005, you should try it on your own responsibility.

Being a SharePoint developer I just wanted to prepare a test web farm for SharePoint using Virtual Server 2005, unfortunately the installer said that I cannot install Virtual Server on Windows Vista Home Premium and it requires more sophisticated Windows Vista editions

It requires Windows authentication in IIS to install its web based management console application, this is what home premium edition is lacking

After a lot of a search and failures, found a solution in an MSDN forum and this solution is NOT supported by Microsoft because we are going to do some unsupported workarounds

  • Turn off UAC and reboot the Vista machine
  • Double click the "Setup.Exe" of Virtual server 2005 and click install.You will be presented that you are running an unsupported operating system. Let the message box be open for some time
  • Dive in to you Temp folder,in my case it is /Aravind/AppData/Local/Temp/. You might need to enable "Show Hidden Files and Folder" from folder options

  • Copy this ”Virtual server 2005 install.msi” file from there to a safe location.
  • Download Orca MSI editor from this location and install it in your vista. Want to know more about what Orca, go to this KB Article
  • Open "Virtual server 2005 install.msi" in Orca
  • Go to Tools - > options - > find the “Database” tab and put a check mark in “Copy embedded streams during Save as”. Click ok to save the changes

  • There you find two panes, scroll the left pane to find “InstallExecuteSequence” and find “CaCheckOS” in right pane. Right click the entry and say “drop row”.

  • Find “InstallUISequence” from the left pane and find “CaCheckOS” in right pane. Right click the entry and say “drop row”.

  • Save all the changes, close Orca and now initiate the installation from this modified MSI file.
  • Choose a custom setup and disable the “Virtual server web application” option in that screen. Because this option will enable the installation of Web management console which depends on Windows authentication.

  • Here you go, complete the installation and say finish. Now we got the virtual server and related services in place without a web management console

  • Now we dont have a management console to create new VM or manage a VM, here comes Microsoft for our rescue
  • Microsoft provides a tool called VMRC plus which has a full management console, at least it provides 98% of all functionalities (it is mentioned in its help file) and it doesn’t require IIS or even internet explorer.

Here you go with your Virtual server 2005 running on top an Unsupported operating system

Related Links

Monday, July 20, 2009

FIX - Firefox 3.5.0 load time delay fixed

Firefox 3.5.0 didn't perform as it promised earlier, especially on loading the browser first time when you click from the start menu or from the quick launch bar. It took approximately around a minute to load the application. Practically no user will wait for this much long time and I ignored using Firefox for day-to-day use.

Finally Mozilla came up with a fix in Firefox 3.5.1 check out the release notes. So moral of the story is upgrade your Firefox to 3.5.1 and get the blazing speed.

Friday, July 17, 2009

Deploying a Cloud solution step-by-step

  1. You should have an compiled Azure Cloud service solution and its service configuration file handy
  2. You should have invitation code to redeem Azure services to unleash Storage and hosting services
Once you have above prerequisites in place, log in to Azure portal using your Live Id and click on your hosting project and follow the steps depicted in screen snaps

Click on deploy to start the deployment

Browse and provide the local path for your cloud service package and its config

Click on "Run" to start the services in staging mode, Be patient here until you see a green symbol under WebRole. Once you get the solution running you can use the URL which is having the guid as the hosted application's URL

Browse to that URL check the features what you have done in that page. Once you are satisfied promote the application to production. There you get the proper name which you specified to your application instead of the guid

Configuring Azure development storage to existing SQL server instance

When we install Windows Azure SDK, Azure development storage and Development fabric by default mapped to a localhost\SQLExpress instance. I don't have an SQL 2005/2008 express editions in my box. So the following changes were required to leverage the existing SQL server instance

For DevelopmentStorage.Exe
  1. Open C:\Program Files\Windows Azure SDK\v1.0\bin in explorer window and open DevelopmentStorage.exe.config file in text editor

  2. Find the connection string named "DevelopmentStorageDbConnectionString" in connection string block, replace the server name from SQLExpress to the instance running in your machine

  3. Find the hierarchy developmentStorageConfig->services->service name="Table-> replace the dbserver value from localhost\SQLExpress to the instance running in your dev machine

For DevtableGen.exe

Open DevtableGen.exe.config file in a text editor, replace the value of key "DefaultSQLInstance" from SQLExpress to your existing instance name. Save and close the editor. This file is used by DevtableGen.exe which Creates tables for use with the development storage table service

Now open your develpment storage UI, it should open with out showing any errors

Thursday, July 9, 2009

Gmail is no more a BETA product

Google apps are out of beta tags. Gmail, Google calendar, Docs and Gtalk are out of beta versions. After more than five years Google removed the beta sticker from Gmail

The Official Google Blog now proclaims: Google Apps is out of beta (yes, really) . And Matthew Glotzbach, director of product management for Google Enterprise more or less spells out that the decision has been taken for marketing reasons.

Google is keen to sell Google Apps to business users.

Are you using Google products ? Awake

Retrieve list of assemblies from GAC

Did you ever want to retrieve a list of assemblies along with their version in Global assembly cache? This will be helpful whenever we make system wide patching or updating to understand what changes happened in GAC or in case if you are troubleshooting on some other client machine if you want the version info of set of assemblies in that remote box quickly

Then this utility is a must in your toolbox(DumpUtil.exe). This console line application gives us a dump like the following

Sample output text from DumpUtil.exe
System.dll (1.1.4322.2407)
System.Configuration.Install.dll (1.1.4322.573)
System.Data.dll (1.1.4322.2365)
System.Data.OracleClient.dll (1.1.4322.2312)
System.Design.dll (1.1.4322.2300)
System.DirectoryServices.dll (1.1.4322.2300)
System.Drawing.dll (1.1.4322.2327)
System.Drawing.Design.dll (1.1.4322.573)
System.EnterpriseServices.dll (1.1.4322.2326)
System.EnterpriseServices.Thunk.dll (1.1.4322.2326)

Related link:

Monday, July 6, 2009

Setting up an FTP server step-by-step

In windows 2003 FTP service is not installed by default
  1. Click Start, point to Control Panel, and then click Add or Remove Programs.
  2. Click Add/Remove Windows Components.
  3. In the Components list, click Application Server, click Internet Information Services (IIS) (but do not select or clear the check box), and then click Details.
  4. Click to select the following check boxes (if they are not already selected):
    Common Files
    File Transfer Protocol (FTP) Service
    Internet Information Services Manager

configure FTP Server for anonymous access

  1. Start Internet Information Services Manager or open the IIS snap-in.
  2. Expand Server_name, where Server_name is the name of the server.
  3. Expand FTP Sites
  4. Right-click Default FTP Site, and then click Properties.
  5. Click the Security Accounts tab.
  6. Click to select the Allow Anonymous Connections check box (if it is not already selected), and then click to select the Allow only anonymous connections check box.

The FTP server is now configured to accept incoming FTP requests. Copy or move the files that you want to make available to the FTP publishing folder for access. The default folder is drive:\Inetpub\Ftproot, where drive is the drive on which IIS is installed.

Now share your FTP address to the users across internet, they can access files.

Thursday, June 18, 2009

STSADM SilverLight viewer

Microsoft released a cool STSADM reference widget in SilverLight which will be easy to refer quickly.

Access the widget from here

Friday, May 22, 2009

SPHttpUtility, a hidden gem

Recently we converted a Rich text field to a plain text field in a content type which resulted in raw html tags messed up with the plain text. There are lot of options to clean a html text to a plain text. We can use Regex, a custom approach etc.

But there is an OOTB way to do it which is hidden in SPHttpUtility class. It has a method called SPHttpUtility.ConvertSimpleHtmlToText which accepts an input html string and max length of input string. This class is specific to WSS Specific Rich text field as per the documentation. Specifying -1 to the max length property will make no maximum length.

We can use this method across the site to update all metadatas to clean up the html strings

This SPHttpUtility is coming in Microsoft.Sharepoint.Utilities namespace more information can be found in MSDN

Friday, May 15, 2009

Free EBook- Virtualization For dummies

Virtualization For Dummies, Sun and AMD Special Edition explains how virtualization works and how it can benefit an organization. The book covers the kinds of issues virtualization can address and how it addresses them.

Virtualization allows you, virtually and cost-effectively, to have two or more computers, running two or more completely different environments, on one piece of hardware. This technology promises to usher in an entirely new wave of hardware and software innovation. It is also designed to enable a generation of more energy-efficient computing
Download Virtualization For dummies

Wanna give a try to Sun's virtualization product then try Virtual Box, an open source technology which comes under GNU public license runs on Windows, Linux, Macintosh & openSolaris.It supports a large number of guest operating systems.

Wednesday, April 29, 2009

Move site collections between content databases using Central Admin

We can use scripted commands to move site collections across the content databases that we all are aware of, Recently I came across an astonishing hidden feature in Sharepoint adminsitration toolkit. 

Batch Site Manager, is that tool which is a hyperlink you will see after installing the toolkit to the MOSS box. This feature should be capable of doing all bulk operartions such as moving, locking and deleting site collections across content databases in a single web application as per MSDN.

Open Central Administration

clicking over the link will open up a new screen as follows and probably you will not see any site collections in the list. You will need to start the statistics aggregation timer job by clicking over "Click here" hyperlink which will populate all your site collections in this page

provide the details such as Target content database, Temporary file location and the schedule to start the job etc.

Yes, it can even send an email upon completion/Failure. So fire and forget. you can see a sample mail 

I did not check this functionality with very huge site collection move activity, if any one carried out please let me know :)

for more information go here

Sunday, April 5, 2009


Office SharePoint Designer 2007 provides the powerful tools you need to deliver compelling and attractive SharePoint sites and quickly build workflow-enabled applications and reporting tools on the SharePoint platform, all in an IT-managed environment.


Download from here

Friday, March 13, 2009

FIX :HTTP 404 returned Searchadministration.aspx after Infrastructure update

After installing Infrastructure update + Dec CU to local VM, my SSP got a lot of UI pages to administrate the search functionality. But unfortunately the /ssp/admin/searchadministration.aspx was not provisioned properly which results in a HTTP 404 error page whenever I click over the link from the quick launch.

After looking in to the \12 hive\Features\ folder this searchadministration.aspx file and a bunch of webpart definition files(ActiveCrawls.dwp, CompletedCrawls.dwp,SubSystems.dwp & SystemStatus.dwp) comes with a feature called S2SearchAdmin which required a forceful activation to bring up this search admin page in SSP.

Finally the following STSADM command did the trick
STSADM -o activatefeature -name S2SearchAdmin -url http://ssp-public/ssp/admin/ -force

Tuesday, March 3, 2009

Integrate SPDisposeCheck tool to Visual Studio 2005

SharePoint developers always used to take additional care to dispose SPWeb and SPSite object as their unmanaged memory footprint really large, failing in this will create serious performance issues.

Luckily Microsoft released a command line tool to inspect the assemblies to identify such issues.

Download SPDisposeCheck here

Find more info here : Roger Lamb's developer blog

Install the SPDisposeCheck.msi installer package and ensure that you have the executable in C:\Program Files\Microsoft\SharePoint Dispose Check\

In visual Studio Select Tools--- > External Tools
Click Add and fill the fields as follows

Now build your project first and run this tool to get the memory leak fix instructions in your output window.

Saturday, January 17, 2009

Look who's watching MSDN blog

Yes, it's Google Analytics watching Microsoft  MSDN SharePoint blog home page
Give a check .

Friday, January 9, 2009

Developers need spell check in Visual Studio

Even Microsoft also needs this functionality, while debugging some issue just got this spelling mistake induced by the product team.