- $serviceApp = New-SPStateServiceApplication -Name “State Service”
- New-SPStateServiceDatabase -Name “StateServiceDatabase” -ServiceApplication $serviceApp
- New-SPStateServiceApplicationProxy -Name “State Service” -ServiceApplication $serviceApp -DefaultProxyGroup
And Bob’s your uncle a brand new State Service springs to life. Brilliant I thought… straight back to my site to try again… but dam the same error showed it’s ugly head.
After pondering throwing myself or the laptop off the balcony it dawned on me that by deleting the service it had probably no longer got an association with the web application. This was indeed the case, so after navigating to the manage web applications page and selecting the service connections I attached the State Service.
All is now well in ‘Publishing Land’ and I can get on with kicking SharePoint just that little bit harder.