Thursday, June 30, 2011

SharePoint 2007 Move Site Collections between content databases

Admin's are regularly presented with operational challenges. One of the most common one is to optimize content database size. We do not want to have large content databases as it becomes difficult to backup/restore

If possible, move site collections between content databases so that the size is manageable.

Step1: stsadm -o enumsites -url "web app url" > sites.xml (Concat results to an xml file.)

Step 2: stsadm -o mergecontentdbs -url "web app url" -sourcedatabasename "source db name" -destinationdatabasename "destination db name" -operation 3 -filename "sites.xml"

Step 3: IISReset /noforce

SharePoint 2007 MOSS WSS default.aspx HTTP 404 backup restore

Scenario / Symptoms:
A site collection is backed up and restored to a different farm. When users navigate to the site default.aspx they receive HTTP 404 error.
Users are able to visit the _layouts/settings.aspx page but not the default.aspx
Default.aspx on some subsites work and some do not.

Make absolutely sure that all custom solutions (wsp) are deployed at the farm level.

This took me a lot of time to figure this out because we never had documentation of all custom solutions on the farm.

Wednesday, June 29, 2011

Tuesday, June 28, 2011

Change sharepoint web application IIS local folder

If you ever need to change the IIS local folder of a sharepoint web application,


Navigate to Central Admin -> Application management
Click on Delete Web application
Drop IIS only! Not Content database
Create new web application with some temp database name and same host header as before.
Do not create any site collections
Navigate to content databases -> remove temp database. You can ask your DBA to permanently remove the temp db later
Open command prompt under farm account and type,
stsadm -o addcontentdb -databasename "old db name" -url "url name"

WSS 3.0 MOSS 2007 Installation Steps

Single Server (Non-Standalone install) on a new domain.
Backup and restore few site collections from an existing SharePoint farm to new farm.


Current SharePoint Farm
- Note version of current farm from Central Admin-> Operations -> Servers in farm-> version column. Mine is hence August 2010 CU patch.

- Since all site collections to be backed up are under 15GB used stsadm -o backup to perform backup.

- Copied backup files over to destination server

New Server Configuration

-Accounts needed
--> Setup account (dbcreator and securityadmin SQL permissions, Local admin on SP server)
--farm account
--pool account(s)
--mysite pool account
--ssp admin pool account
--search access account (used while starting office search service)
--ssp service account (used while provisionsing ssp)

- Web Apps needed
--> Collaboration web apps
--> Central Admin Web App
--> SSP Web App
--> Mysite web app

-install powershell on windows server 2003 which has a dependency on .net framework 2.0 sp1
.net framework 2.0 sp1:


- Restart server

- Install SQL Server 2005 SP3

- Download and install windows imaging component en-us from here,

- Download and install .net framework 3. Remember .net framework 4 will not suffice the prerequisite. If this is not installed it throws a windows workflow foundation exception,

- Download and install wss 3.0 sp2 from here,

--> Remember to install Advanced -> Web Front End.
--> Do not run PSConfig now

- Download and install moss 2007 with sp2 full version from your msdn subscription
MOSS 2007 with SP2 includes WSS 3.0.

- Run PSConfig and provide Central Admin details and farm account.

- Install WSS / MOSS Aug 2010 CU
Download and install WSS update: (do not run psconfig);EN-US;2276474

Download and install moss update;EN-US;2276474

- Run psconfig or "SharePoint Products and Technologies Configuration Wizard"

- Create web application, e.g.
-- make sure to host IIS local folder on seperate drive other than c:\
--> NTLM
--> Non-HTTPS
--> New App Pool with independent identity
--> Unique database name

- IISReset /noforce

- Add host file entry to point hostheader "sharepointsite" to current server IP ""

-Add stsadm as environment variable,

- Add managed paths if required. In my case I had to.

- Create a site collection

- Configure host file on server to point all web application host headers to

- Configure site collection quotas from Central Administration or powershell

At this point you are ready to use this site on the server.

- Add DNS entries for using site's hostheader and server IP address and this site is good to go.

The current identity “domain\username” does not have write access to ‘C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files’.


Basically is not correctly installed on the server. hence perform the steps mentioned in this blog to fix. I did not have to add my app pool account to IIS_IUser group.

- Set up IIS Logs to a drive which has ample space.
- Set up diagnostic logging to a drive which has ample space.

- If there are multiple domains involved with one-way trust, setup people-picker to read from all domains using,
STSADM.EXE -o setproperty -pn peoplepicker-searchadforests

For me there are some more steps:

- Deploy custom solutions from source farm to destination farm
- Restore site collection to new webapplication using stsadm -o restore

Error: default.aspx is corrupt and site collection root page is returning HTTP 404

- setup SSP

- Disable SharePoint designer,

- If you ever need to change the IIS local folder of a sharepoint web application,


Navigate to Central Admin -> Application management
Click on Delete Web application
Drop IIS only! Not Content database
Create new web application with some temp database name and same host header as before.
Do not create any site collections
Navigate to content databases -> remove temp database. You can ask your DBA to permanently remove the temp db later
Open command prompt under farm account and type,
stsadm -o addcontentdb -databasename "old db name" -url "url name"

- SSP Creation:
-- pre-req: create mysite, ssp admin webapp, start office sharepoint search service and set indexing server.
-- change index file location to a drive with max space.
-- set ssp account which is different from admin pool account and search access account.

- Configure User profile synchronization
-- configure import connections, if it is the same domain then no need to specify account
-- setup import schedule
--start import

- Configure Search
-- setup content sources
-- setup crawl schedules
-start crawl

-Configure email settings.
--Exchange connector settings
--SMTP Relay


Monday, June 27, 2011

SharePoint 2010 Authenticate multiple providers LiveID, FaceBook, Google

Authenticate external users in SharePoint 2010 using multiple authentcation providers like Google, LiveID, Facebook etc using Azure ACS (ADFS 2.0 in the Cloud)


Sunday, June 26, 2011

Ubuntu Linux RDP Windows

How to setup remote desktop to open ubuntu desktop from windows.


Detailed Steps:

On Ubuntu version 11.04
1. Click Windows + R on keyboard or the top left most ubuntu button.
2. In the search windows type, "remote"
3. Click on the first icon, "remote desktop"
4. Click on "Allow other users to control your desktop" and choose all options under Security and enter a seperate password for additional security.
5. note down the ip address that is displayed.

On Windows or any other machine which supports VNC standards,
1. Download TightVNC from,
2. Install only Desktop Viewer and not the server if you only want to control other ubuntu desktops and not to use the windows machine as a server.
3. Run VNC Viewer and enter IP address and click connect
4. It will ask for the password, enter the one tht was set above.

Connection should be established.

To open a windows desktop using RDP from a ubuntu using the "terminal server client" already installed as part of ubuntu 11.04

Windows LiveID - SharePoint 2010 Integration


1. The Windows Live ID cookie is cached on the client computer and sent to SharePoint Foundation 2010 by way of a POST response to a successful authentication request.
2. SharePoint Foundation 2010 converts the Windows Live ID SAML token to a SharePoint Foundation 2010 SAML token.
3. The PUID for the user is generated based on the user principal name (UPN) claim returned in the SAML token. This value is used throughout SharePoint Foundation 2010 to uniquely identify the user and perform access control.
4. SharePoint Foundation 2010 can augment user tokens with additional claims by using a custom claims provider, which is configured in the SharePoint Foundation 2010 Web application.
5. The SharePoint Foundation 2010 cookie is also returned to the client computer and cached for subsequent requests.
6. When the Windows Live ID or SharePoint Foundation 2010 cookie expires, the user is redirected to a Windows Live ID server.

Saturday, June 25, 2011

Ubuntu 11.04 - Install flash

Perfect example,

Welcome to Ubuntu - LAMP beginner

Install ubuntu desktop version and install LAMP stack for beginner.

1. Downloaded and installed ubuntu 11.04 desktop from ubuntu website
2. configured all desktop applications
3. opened terminal
4. sudo apt-get update
5. sudo apt-get install tasksel
6. sudo tasksel install lamp-server
6. Open firefox, http://localhost -> It Works


Friday, June 24, 2011

New domain name was born today !

Why replicate directory changes permission sharepoint 2010 user profile synchronization

Question: Why are replicate-directory-changes permissions needed to synchronize with AD and on what in AD?

Answer: In order to interrogate AD about “what has changed since time xyz”, we need the replicate-directory-changes permissions on partitions being synchronized, for example the domain partition being synchronized. These permissions are needed in particular to be able to read data within the deleted objects container of the partition. Standard users do not have permissions to read the content of this container, and we cannot simply grant rights over that container to the synchronization account.
In RC we also require these permissions on the cn=configuration container, in order to access the netbios information for the domain (we are working to fix this for RTM, so this container permissions will be required only if your netbios name is different than your domain name)

Question: Do the replicate-directory-change permissions allow the holder to modify AD?
Answer: Holder cannot modify AD using these permissions

Question: What additional privileges are granted (beyond the ability to read and inquire of delta changes) with replicate-directory-changes permissions?
Answer: Holder can read all AD data for the domain, except passwords. Note that most of the directory information is by default readable by everyone, including data in the configuration partition.


Tuesday, June 21, 2011

SharePoint Profile Import using AD.

This article explains the detailed steps to import profiles from AD to SharePoint,

Monday, June 20, 2011

MOSS 2007 search crawler Stopping / Crawling / Crawling Full

Users are complaining that new documents added to SharePoint platform are not being returned in the search results.

Search content source crawler is in Crawling/Crawling Full or Stopping state.

1. Run the following command on all the Query and Index server one at a time and make sure that there are no errors.

net stop osearch
net start osearch

2. This command does not drop the search index.

3. After this command has executed correctly on all servers then the content source status should be set to Idle and it will start again as per its regular crawl schedule.

The real reason behind why the the crawl stops intermittently is still not determined in our environment. Also we are looking at options to monitor crawl status either using MS SCOM 2007 or writing custom code so that admins are alerted when crawls do not complete in acceptable amount of time.

Some quick links that may help. Please note that some of the steps may actually drop existing search index or call for creating a new SSP,

Project Server 2007 - Content Database attach / dettach

Never detach and then attach a content database that hosts project server web access site. It looses its link with the SSP that created it and users will get the below exception when they try to access the web access site,

401 Unauthorized access Exception.

"As best practice maintain all project workspace site collections as part of a different database than the pwa site collection." otherwise they also loose the link the web access.

Navigate to SSP which created the PWA
1. Take SQL backups of all PWA databases.
2. Create a new PWA
3. Provide the same name of the pwa that existed along with all the exact same names of databases that are already created.
4. Try to provision the PWA
5. Note that the account used to perform the above activities should be the SSP service account.

Once the PWA is provisioned the site should open fine.

Friday, June 17, 2011

People picker - slow performance

Use this people picker setting to configure it read user values from specific forests.


Sharepoint guidance no context retrieve configuration

IConfigManager configManager = new HierarchicalConfig();
configManager.GetFromPropertyBag(key, site);