Friday, February 18, 2011

SharePoint 2010 – 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.

OK, so I’ve been just a little hands-off for the past couple years as I took on more project/practice management responsibilities. But here I am in my new position, eagerly getting my hands back in the dirt. I’m sure much of what I’ll post here in the beginning is common knowledge, but the blog thing for me is just as much of a personal reference as anything else.

Back to the purpose of this post. I just deployed my first custom workflow to my new SharePoint 2010 dev environment. When I tried to kick the workflow off from the browser, I got this (actually helpful) 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.”. The guide I followed for setting up my environment didn’t mention anything about the State Service, but give it a quick Google and you’ll see that it’s quite important for InfoPath Forms Services. But how to create this Service Application? I didn’t come across anything in the Manage Service Applications interface, but thanks to Jeremy Taylor’s post, I was back up and running in no time. Here’s the PowerShell script needed to create the State Service Application:

   1: $serviceApp = New-SPStateServiceApplication -Name "State Service Application"
   2: New-SPStateServiceDatabase -Name "Dev_State_DB" -ServiceApplication $serviceApp 
   3: New-SPStateServiceApplicationProxy -Name "State Service Application" -ServiceApplication $serviceApp -DefaultProxyGroup

No comments:

Post a Comment