I was getting the below error in sharepoint 2010 server. however when i look into the state service i could see the service is running.
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
1)Checked the heath analyzer and found that there is an error which says "No database is associated with the state service applications"
2) run the powershell script which most of the people suggested. it didnt work out.
3) so deleted the existing state service from central admin and recreated.
4) attached the application to the state service
It worked this time