Cannot start service SPAdmin on computer

By Namwar Rizvi - Last updated: Tuesday, August 12, 2008

It is really frustrating if you see the error “Cannot start service SPAdmin on computer” after running Sharepoint Product and Technologies Wizard when you know that there is nothing wrong from your side. After researching on internet I found an article here which describes four possible solutions. In my opinion, the fourth solution is the best and works 90% of the time. Following is the solution (All credit goes to original author):

Step 1

On the machine where psconfig failed to start the SPAdmin service run:

%commonprogramfiles%\Microsoft Shared\Web Server Extensions\12\BIN\psconfig -cmd upgrade -inplace b2b -wait -force

Step 2

Modify the service timeout values in the Registry:

HKLM\SYSTEM\CurrentControlSet\Control add/modify DWORD value ServicesPipeTimeout to 60000 (60 seconds)

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control add/modify STRING value WaitToKillServiceTimeout to 120000 (120 seconds)

Step 3

Restart the server machine.

Share
Filed in Configuration • Tags: ,

Visual Studio 2008 Extensions for WSS, Version 1.2

By Namwar Rizvi - Last updated: Thursday, August 7, 2008

Visual Studio 2008 Extensions for windows Sharepoint Services 3.0 is an excellent toolkit to develop Web Parts, Custom Fields, List Definitions etc.

You can download it from here

You will need following on your PC

  1. Windows Sharepoint Services 3.0 (Only Basic Installation)
  2. Visual Studio 2008 (Standard, Professional or Team Edition)

This toolkit provides

Visual Studio 2008 Project Templates

Visual Studio 2008 Item Templates (items that can be added into an existing project)

SharePoint Solution Generator

Share
Filed in Templates • Tags: , ,

How to get SPUser (User) from Person or Group field of Sharepoint List

By Namwar Rizvi - Last updated: Saturday, July 26, 2008

While writing document event handler, sometimes we need to to process the logic based on the value of Person or Group field. Sharepoint stores ID of the user in Person or Group field and there is no obvious way to get the SPUser object from this ID because this ID is stored as ID field in the userinfo and userdata tables. Following function is the qucikest way to get SPUser object from ID. Call this function with

  1. the name of the Sharepoint list where your event is fired and
  2. SPItemEventProperties object which has been passed to you as your event arguments
public SPUser GetSPUserFromID(string listName, SPItemEventProperties properties)
{
SPFieldUser userField = (SPFieldUser)properties.OpenWeb().Lists[listName].Fields.GetField(accountNameField);
SPFieldUserValue fieldValue = (SPFieldUserValue)userField.GetFieldValue(currentValue);
SPUser user = fieldValue.User;
return user;
}
Share
Filed in Event Handler • Tags: ,

How to get rid of Login prompt while opening documents in Microsoft Office

By Namwar Rizvi - Last updated: Friday, July 18, 2008

If you are using Sharepoint as your document repository, you may came across with a situation where your users are prompted for login credentials whenever they try to open any document of document library in Microsoft Word. This is very irritating and can ruin the objective of user productivity.

You can resolve this issue very easily. It happens actually if your Sharepoint site is not in the trusted zone of IE. You can verify this by looking at the bottom right of your browser window as follows:

Internet zone icon

If you see the word “local intranet” or “Trusted sites” then only you can open your documents without getting prompt of login credentials. Just add your Sharepoint site into the “Trusted sites” zone and bingo! MS Word will stop prompting you for your credentials. Enjoy!

Share
Filed in Security, Uncategorized • Tags:

Registry setting for Sharepoint Configuration Database connection string

By Namwar Rizvi - Last updated: Wednesday, July 16, 2008

Ever wondered where does Sharepoint saves its configuration database connection information? Sharepoint 2007 saves its connection string for configuration database in registry and you can change it easily if you have moved your configuration database from one server to another. Following is the registry path

My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDb

and our required key is dsn

Share
Filed in Configuration • Tags: ,