After you install SharePoint Server 2010 you may see the following warning in the Health Analyzer Reports.

InfoPath Forms Services forms cannot be filled out in a Web browser because no State Service connection is configured.

If you have configured a workflow form, you may see the following error.

The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator.

Resolve Problem

Configure the State Service. The State Service is automatically configured as part of the Basic installation of SharePoint Server 2010. However, the Advanced installation of SharePoint Server 2010 requires separate configuration of the State Service. You can use one of the following two methods to configure the service.

  1. Farm Configuration Wizard (I don’t recommend using this wizard after installing SharePoint).
  2. PowerShell (this is my preferred method).

The default configuration for the State Service is sufficient for most configurations and you only need additional configuration if your server farm has a very large number of InfoPath active state sessions for forms or charts, or you may need additional configuration in hosted environments.

The default configuration includes the following.

  • One State Service service application.
  • One State Service database on the same database server that contains the configuration database. The databases must be associated with the service application.
  • One State Service application proxy associated with the default proxy group of the server farm.

As I mentioned earlier, I prefer using the PowerShell to configure the State Service. By the way, you can also use PowerShell to perform configuration tasks that are not available on the Central Administration site of the farm.

Use PowerShell to Configure the State Service

Here are the steps to configure the service using PowerShell.

  1. Verify that you meet the minimum requirements. See Add-SPShellAdmin for more details. Essentially, you need to add the logged in user account to the SharePoint_Shell_Access role in the target database using the following syntax.
    Add-SPShellAdmin [-UserName]
    If you are already logged in as a user that has the securityadmin and dbowner role in SQL Server and is a member of the WSS_Admin_WPG user group then you can skip this step.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. To create a service application, type the following command:
    $serviceApp = New-SPStateServiceApplication -Name “<StateServiceName>
    For example, $serviceApp = New-SPStateServiceApplication -Name “Intranet Farm State Service“
  6. After the service application is created, you need to create a State Service database and associate it with a service application.
    New-SPStateServiceDatabase -Name “ <StateServiceDatabase>” -ServiceApplication $serviceApp
    For example, New-SPStateServiceDatabase -Name “StateServiceDB” -ServiceApplication $serviceApp
  7. To create a State Service application proxy, associate it with the service application, add it to the farm’s default proxy group, type the following command.
    New-SPStateServiceApplicationProxy -Name “<ApplicationProxyName>” -ServiceApplication $serviceApp -DefaultProxyGroup
    For example, New-SPStateServiceApplicationProxy -Name “Intranet Application Proxy” -ServiceApplication $serviceApp -DefaultProxyGroup
  8. Here’s what the summary of the commands might look like. The commands in the red are the one you would type, the output is shown in blue.
  9. As soon as you run the above command to finish configuring the State Service, re-analyze the rule (listed in the problem section above) in the Health Analyzer Reports.
  10. Click the rule and then click Reanalyze Now.
  11. Refresh the screen. The warning message should disappear in the Health Analyzer Reports.