SharePoint 2016 : Workflows – resolving 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.” PowerShell script to create “State Service” service application

Hi All,
Greetings for the day 🙂 LIFE IS BEAUTIFUL 🙂
Today new issue and solution 🙂
Details / Background :
- We have migrated our SharePoint 2013 site to our new SharePoint 2016 server
- We have around 5 workflows to be migrated
- Our workflows are migrated successfully 🙂
- But to test workflows when we starting workflows we are getting an error / issue related to “State Service” service application
Error / Issue 1:
The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service.
Error / Issue 2: – This below error is can be seen in Health Analyser as well
InfoPath Forms Services forms can not be filled out in a Web browser because no State Service connection is configured

Solution :
- It seems that “State Service” service application is not created / configured on our new SharePoint 2016 server
- By default “State Service” service application is not available to create from – Service application page – in Central Administration
- So we created “State Service” service application using PowerShell
- As “State Service” service application is created, we are able to see the workflow – can be started
What is “State Service” service application ?
- “State Service” is a shared service used by some of the features of SharePoint like InfoPath forms – having OOB and custom workflow forms
- This service is used to store temporary data related to HTTP requests in SQL server database
- Also, State Service must be properly configured for the Search Administration Crawl and Query Health Reports to work properly
Creating State Service application :
- There are only two possible ways to create “State Service” service application
- Executing SharePoint Farm Configuration Wizard
- PowerShell script
- In this article we will discuss second approach – PowerShell script
Step by Step powerShell script to create “State Service” application :
- Create new “State Service” service application using CMDLET – New-SPStateServiceApplication
New-SPStateServiceApplication
[-Name] <String>
[-AssignmentCollection <SPAssignmentCollection>]
[-Database <SPStateDatabasePipeBind>]
[<CommonParameters>]
#Create new "State Service" application
$StateService_application = New-SPStateServiceApplication -Name "State Service"
- Create database for “State Service” service application using CMDLET – New-SPStateServiceDatabase
New-SPStateServiceDatabase
[-Name] <String>
[-AssignmentCollection <SPAssignmentCollection>]
[-DatabaseCredentials <PSCredential>]
[-DatabaseServer <String>]
[-ServiceApplication <SPStateServiceApplicationPipeBind>]
[-Weight <Int32>]
[<CommonParameters>]
#Create DB for State Service Application
$StateService_applicationDB= New-SPStateServiceDatabase -Name "KnowledgeJunction_SP_StateService" -ServiceApplication $StateService_application
- Create a proxy for “State Service” service application using CMDLET – New-SPStateServiceApplicationProxy
#Create proxy for State Service application
New-SPStateServiceApplicationProxy -Name "KnowledgeJunction_SP_StateService" -ServiceApplication $StateService_application -DefaultProxyGroup
- Initialize the “State Service” service application DB using CMDLET – Initialize-SPStateServiceDatabase
Initialize-SPStateServiceDatabase -Identity $StateService_applicationDB
Complete PowerShell script for creating “State Service” service application :
#Create new "State Service" application
$StateService_application = New-SPStateServiceApplication -Name "State Service"
#Create DB for State Service Application
$StateService_applicationDB= New-SPStateServiceDatabase -Name "KnowledgeJunction_SP_StateService" -ServiceApplication $StateService_application
#Create proxy for State Service application
New-SPStateServiceApplicationProxy -Name "KnowledgeJunction_SP_StateService" -ServiceApplication $StateService_application -DefaultProxyGroup
Initialize-SPStateServiceDatabase -Identity $StateService_applicationDB
- We could verify our service from “Central Administration” – service application page – _admin/ServiceApplications.aspx/

Thanks for reading 🙂 HAVE A GREAT TIME AHAEAD 🙂
You must log in to post a comment.