Friday, July 22, 2005

The service did not start due to a logon failure

My SharePoint farm environment was having bit trouble with the domain account used to run the SPS services. I was getting following error message all the time when I reboot the machine or restart the service.

The service did not start due to a logon failure.

This was preventing the users accessing search results, alerts and other SPS functionalities.

The following error message was recorded in System Event log

The SPSAdmin service was unable to log on as DOMAIN\ account_name with the currently configured password due to the following error:
Logon failure: the user has not been granted the requested logon type at this computer.

To ensure that the service is configured properly, use the Services snap-in in Microsoft Management Console (MMC).

EventID :7038


After doing some research on the Event Id 7038, I realise that the domain account is loosing its “Log on as a service” rights when I restart the service. After configuring the machine group policy to add this right to the domain account and making sure the domain group policy won’t overwrite it, it’s working with out a problem.

Wednesday, July 13, 2005

Using Session state in a SharePoint Environment

I have been asked so many times by SharePoint developers why can’t they use Session objects in web parts. Normally they get the following error message,

Exception Details: System.Exception: Session state can only be used whenenableSessionState is set to true, either in a configuration file or inthe Page directive

I received following email from a reader that got this problem fix.

Gayan,
How r u ? Well good news is that if you remember we had spoken about the session state in ASP.NET Application and you advised me to use View state, well I have figured out easy approach, we just have enable session state in Web.Config File. If we look at

<system.web>
<identity impersonate="true"/>
<httpmodules>
<clear/>
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />

<add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" />
<!--<addname="Session"

type="System.Web.SessionState.SessionStateModule"/> ---->
</httpmodules>
<globalization fileencoding="utf-8"/>

<compilation debug="false" batch="false"/>

<pages enablesessionstate="false" enableviewstate="true"

enableviewstatemac="true" validaterequest="false"/>

<!-- <addname="Session"

type="System.Web.SessionState.SessionStateModule"/>---/>

we need to uncomment this line out also

"enableSessionState="false" need to be "true"

I don’t know if this is going to help you or not. But it did resolve my issue. I found this article on MSDN here is the link
http://support.microsoft.com/default.aspx?scid=KB;EN-US;828810

Also wanted to say thank you for helping me out.

Best Regards
Attiq Khan

Monday, July 04, 2005

Assign new logon service account for SharePoint services

Following are the steps for changing a SharePoint logon service account. You may find theses steps useful if you need to change the SharePoint services domain account for some reason after completing the configuration. Please create the new account by performing the following steps:

Reset the index for Portal_Content and Non_Portal_Content.

Enable advanced search administration mode, this will create an additional section called Content Indexes on the Configure Search and Indexing page. The steps are:

  • On the Site Settings page, in the Search Settings and Indexed Content section, click Configure search and indexing
  • On the Configure Search and Indexing page, in the General Content Settings and Indexing Status section, click Enable advanced search administration mode.
  • On the Enable Advanced Search Administration Mode page, click OK.

Then perform the following steps to reset the index:

  • On the Site Settings page, in the Search Settings and Indexed Content section, click Configure search and indexing.
  • On the Configure Search and Indexing page, in the Content Indexes section, click Manage content indexes.
  • On the Manage Content Indexes page, rest the pointer on the index name, and then click the arrow that appears.
  • On the menu that appears, click Reset Content Index.
  • On the message box that appears, click OK.Resetting the index stops any updates that are in progress and empties the index completely.In a server farm configuration, the old index exists on the search servers until you force propagation.
  • After you reset a content index, you must perform a full update. (Wait till you complete the rest of the steps.).To do this:1. On the Manage Content Indexes page, rest the pointer on the index name, and then click the arrow that appears.2. On the menu that appears, click Full Update.


Create a Domain Logon Name 'SPSAdmin' with Password Never Expires

Join the domain name in Local Administrator, IIS_WPG,STS_WPG,SPS_WPG,SPS-Query Groups.

Add the 'SPSAdmin' in SQL Enterprise Manager with Server roles as Database Creators, Security Administrator, System Administrator.

  • Start SQL Server Enterprise Manager.
  • Expand Microsoft SQL Servers, expand the server group, expand the appropriate server, and then expand Security.
  • Right-click Logins, and then click New Login.
  • Type the account name in the Name box. Use the following format for the account name:
  • DomainName \ AccountName
  • Note If SQL Server is installed on a separate computer and you want to run the application pool as the Network Service account, the computer that is running Windows SharePoint Services must have permissions to access the remote computer that is running SQL Server. On the remote computer that is running SQL Server, add the DomainName \ ServerName $ account to the Database Creators role and to the Security Administrators role.
  • Click the Server Roles tab.
  • In the Server Role list, click to select the Security Administrators check box, and then click to select the Database Creators, Security Administrator and System Administrator check boxes. Click OK.

Assign the 'SPSAdmin' in Server Farm Account Settings.

  • On the SharePoint Portal Server Central Administration for server_name page, in the Server Configuration section, click Configure Server Farm Account Settings.
  • On the Configure Server Farm Account Settings page, in the Default Content Access Account section, do the following:
  • Select the Specify account check box.
  • In the User name (DOMAIN\user name) box, type the user name in the format DOMAIN\user_name.
  • In the Password box, type the password for the account.
  • In the Confirm Password box, type the password again.
  • On the Configure Server Farm Account Settings page, in the Configuration Database Administration Account section, do the following:
  • Select the Specify account check box.
  • In the User name (DOMAIN\user name) box, type the user name in the format DOMAIN\user_name.
  • In the Password box, type the password for the account.
    In the Confirm Password box, type the password again.
  • If you don’t do this step, you will receive (The gatherer index was not initialized. The content index must be remounted. If the index is still not initialized, remove it.) error message.
  • Click OK.

Assign the 'SPSAdmin' in for the Application Pools used for the portal sites.

  • On the Configure Server Farm Account Settings page, in the Portal Site Application Pool Identity section, do the following:
  • Select the Specify account check box.
  • In the User name (DOMAIN\user name) box, type the user name in the format DOMAIN\user_name.
  • In the Password box, type the password for the account.
    In the Confirm Password box, type the password again.

Once all steps are performed please don't forget to replace the logon details (username / password) for the 'SPSAdmin' account for each SharePoint service (before reboot).