Enable-SPSessionStateService : '=' is an unexpected token RRS feed

  • Question

  • I can't seem to run the below command to enable sessions in my sharepoint farm. This is a single tier deployment and am part of the NT administrators group and Farm Administrators in Sharepoint.
    PS> Enable-SPSessionStateService -DefaultProvision
    Enable-SPSessionStateService : '=' is an unexpected token. The expected token i
    s ';'. Line 786, position 123.
    At line:1 char:29
    + Enable-SPSessionStateService <<<<  -DefaultProvision
        + CategoryInfo          : InvalidData: (Microsoft.Offic...teServiceCmdlet:
       EnableSessionStateServiceCmdlet) [Enable-SPSessionStateService], XmlExcept
        + FullyQualifiedErrorId : Microsoft.Office.Server.Administration.EnableSes
    • Moved by Mike Walsh FIN Tuesday, June 14, 2011 10:13 AM not general (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Monday, June 13, 2011 5:59 PM


  • I will reply to my own post since I resolved the issue! :) The cmdlet was failing because it was not happy with an AppSetting value I manually put in one of my config file. I know we are not allowed to edit web.config by hand but I am in a dev environment and wanted something quick. Regardless, I am completly stupified that it would inspect an AppSetting value which in my case contained URL value containing the word next_url in the query string. When I opened the web.config in Visual Studio, I saw this line in the web.config (line 786 btw...) with error description of "Entity 'next_url' not defined". Anyway, it wasn't really obvious an spent a couple of hours figuring out why such a simple powershell cmd would fail on me.
    Monday, June 13, 2011 7:09 PM