Thursday, March 25, 2010

Stsadm -o migrateuser Generates Error "Object reference not set to an instance of an object"

I have been involved in some migration tasks for SharePoint, that includes changing of the domain name. SharePoint has quite easy ways of doing migration, as long as you don't meet some strange error messages (hey, I think this applies to any migration!). I will discuss about the data migration in more detailed, hope by next post (however, if you need some information for data migration in SharePoint, please feel free to drop comment).

So, once you meet strange error message, the data migration is not that easy anymore. One error message that keeps me busy doing research is running stsadm -o migrateuser -oldlogin [oldloginname] -newlogin [newloginname] -ignoresidhistory, that return error "Object reference not to set to an instance of object". I just found out recently that it's actually caused by one SSP with status "Unprovisioning". What I need to do is just to delete this SSP, and, voila, the stsadm migrate user command runs succesfully. =

However, it's not a smooth journey to delete this "Unprovisioning" SSP either. The command that save me is stsadm -o deletessp -title [sspname] -force. The first time I executed this, the command hang for very long time. I try to restart the server, and first thing after restart is to execute this command, and it succeeds.

Tuesday, March 09, 2010

SharePoint doesn't work well with IPv6

I have just setup a new server farm for SharePoint. After finish installation for all server farm, I start configuring the Shared Service Provider, include activating SharePoint Search. Once the Search turned on, the whole SharePoint site is inaccessible from the server that hosts the Central Administration, all other Web Front End is ok. The page just displayed 503 - Service unavailable. IIS showed that Application Pool has been stopped, so I start it again, but everytime there is a request to the site, the Application Pool stop again.

After checking through the forum and all blogs, it turns out the evil here is the IPv6 is enabled. After turn IPv6 off, all the site work properly again. Damn.. wasted almost 1 hour close to midnight..

Wednesday, January 13, 2010

SharePoint: How to Move Default Virtual Directory/Site Path Location (Site and Central Administration)

I have encountered requirement to move all the virtual directories to non-system drive. By just removing the default location from C:\inetpub\wwwroot\wss\virtualdirectories\xx to another drive and set the path in IIS will not solve the problem, somehow SharePoint keeps their own path to the original location, and displays some critical error instead.

So the solution is to update the WebApplication to point to the new Virtual Directory location. Luckily, I found this blog that teaches how exactly to do this. So I just create a simple console application that can be executed (using Farm Administrator) from command prompt, e.g. ChangeDefaultDirectory.exe "http://site:80" "Default" "D:\inetpub\WSS\VirtualDirectories\80". And after IISReset, woolahh.. my site are back in action again. This can be used for Central Administration and SSP too. Just be careful with SharePoint Shared Service Provider, you need to use "http://site:xxxx/ssp/admin". For one that needs this simple console, please comment this post with your email, and I will send it to you.

The other things to take note is the default directory of the new Web Application created in SharePoint Central Admin. It might be easily overlooked when you create new Web Application. This blog provides what exactly you need. For IIS7, I found that you only need to change the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp key and modify the PathWWWRoot Value data to D:\Inetpub\vroots. Don't forget to backup your registry before any modification.