How to Create State Service Application in SharePoint 2016?

Many components like InfoPath Form services, Visio, Search Service, workflows, etc., relies on the State Service Application of SharePoint to store the application sessions. If it’s not configured already, you’d probably see error messages such as:

“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 2016?

State service application can’t be created through the new service application page. If you go to the New dialog of Central Administration >> Manage Service Application page, you won’t find it! Here is how to create a state service application in SharePoint 2016.

  1. Go to Central Administration site >> Click on “Configuration Wizards” link from the bottom.
  2. In Configuration Wizards page >> click Launch the Farm Configuration Wizard link >> and then click “Start the Wizard”.
    sharepoint 2013 configure state service application
  3. On the services configuration page, under the Services applications section, select the State Service check box (select any other service applications you may require) and click Next.
    create state service application sharepoint 2016 powershell
  4. Click on Skip button if you setup a top-level site collection. If not, go ahead and create it now by clicking OK.

You can verify the new state service application by going to Central Administration > Application Management > Manage service applications >> State service application should be listed there!

create state service application sharepoint 2016

Once you have created a state service application, make sure your new state service application is associated with your web application by going to Central Administration >> Manage Web Applications >> Select your web application >> Click on “Service Application Associations” from the ribbon >> and in “Configure Service Application Associations” page, State Services should be selected.

Disadvantage: Configuration wizard creates state service database with GUIDs! E.g. StateService_2349fb4359fb45c9a5255562cb0eab0b. So, to avoid GUIDs in the database, create the state service application using PowerShell:

SharePoint 2016: Create State Service Application using PowerShell

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Configuration variables
$ServiceAppName = "State Service Application" 
$ServiceAppProxyName ="State Service Application"
$DatabaseName ="SP16_State_Service"

#Create New State Service application
$StateServiceApp = New-SPStateServiceApplication -Name $ServiceAppName 

#Create Database for State Service App
$Database = New-SPStateServiceDatabase -Name $DatabaseName -ServiceApplication $StateServiceApp  

#Create Proxy for State Service
New-SPStateServiceApplicationProxy -Name $ServiceAppProxyName -ServiceApplication $StateServiceApp -DefaultProxyGroup  

Initialize-SPStateServiceDatabase -Identity $Database

Write-host "State Service Application Created Successfully!"

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *