How to Create State Service Application in SharePoint 2013?
When tried using browser-based forms, InfoPath farm services gave me this error message:
“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.”
How to Create State Service Application in SharePoint 2013?
State service stores temporary state data between requests. When you use the SharePoint farm configuration wizard, it creates a State Service application automatically. State service can be created via PowerShell, as there is no provision in Central Admin. There are SharePoint features such as InfoPath Forms Services, Workflows are depended on state service.
Configure the State Service using PowerShell
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Create New State Service application
$StateServiceApp = New-SPStateServiceApplication -Name "State Service Application"
#Create Database for State Service App
New-SPStateServiceDatabase -Name "SP13_State_Service" -ServiceApplication $StateServiceApp
#Create Proxy for State Service
New-SPStateServiceApplicationProxy -Name "State Service" -ServiceApplication $StateServiceApp -DefaultProxyGroup
Provision state service application SharePoint 2016
The above script works for SharePoint 2016 also to create new session state service application.