Friday, February 17, 2012

State Service error while working with infopath forms on Sharepoint 2010 farm

You will get this error while working with infopath forms on a Sharepoint 2010 farm.
"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."

This happens because state service application has not been configured properly or it does not have a database and is not associated with default proxy settings. State service is used by SharePoint to store temporary objects.

Follow the steps below to create state service application instance, create database and associate it with default proxy


To create a service application, type the following command:
$serviceApp = New-SPStateServiceApplication -Name "State Service"

If State service already exists and there is no database for it. type the commands below to create one
$ServiceApp = Get-SPStateserviceapplication
New-SPStateServiceDatabase -Name "svcApp_StateService" -ServiceApplication $serviceApp

To associate the State service with default proxy, type in the command below..
New-SPStateServiceApplicationProxy -Name "State Service" -ServiceApplication $serviceApp -DefaultProxyGroup

Once this is done, error you are getting should be gone.








No comments:

Post a Comment