This was because State Service was not configured in my SharePoint environment.
To configure State Service, I run the following PowerShell script.
Add-PsSnapin Microsoft.SharePoint.PowerShell
$serviceApp = New-SPStateServiceApplication -Name "State Service" New-SPStateServiceDatabase -Name "StateServiceDatabase" -ServiceApplication
$serviceApp New-SPStateServiceApplicationProxy -Name "State Service" -ServiceApplication $serviceApp –DefaultProxyGroup
I added this script in a text file and saved it as script.ps1 on my C drive. Then I opened command prompt and ran this command.
C:\>Powershell C:\script.ps1
After running this script, my State Service was configured and I published my page successfully.
No comments:
Post a Comment