SharePoint: ServerContext not set to an instance

I was playing through SharePoint object model and somewhere (don’t remember right now!) got an exception stating “ServerContext not set to an instance”.

My solution for this: Installed SSP (Shared Services Provider) and this problem is solved!
[ Edited:2008-03-24
I got this error while playing with stsadm.exe command