none
Session State Problem after completeing SP upgrade

    Question

  • After upgrade environemnt "Current DB ver 14.0.6114.5000" below error appear when browse site thru mobile:

    Session state can only be used when
    enableSessionState is set to true, either in a configuration file or in the
    Page directive. Please also make sure that System.Web.SessionStateModule or a
    custom session state module is included in the <configuration>\<system.web>\<httpModules>
    section in the application configuration.

    Wednesday, February 29, 2012 9:58 AM

Answers

  •  

    Hi,

    From your narration, I suggest that you use the following steps to enable session state:

    1. Enter the following PowerShell command in the SharePoint 2010 Management Shell window:

    Enable-SPSessionStateService –DefaultProvision

    1. On each web application for which you want to use session state, edit the web.config file and set the enableSessionState property of the pages element as follows:

    <pages enableSessionState="true"

    For more information about how to enable asp.net session state, see

    http://blogs.msdn.com/b/markarend/archive/2010/05/27/using-session-state-in-sharepoint-2010.aspx

    Thanks,

    Rock Wang


    Rock Wang TechNet Community Support

    Friday, March 02, 2012 8:32 AM

All replies

  • PLEASE HELP ME!

    i created another web application, tried to browse it using my mobile device, it asks for username and password!!!

    is it a farm issue ?? or what ?

    Help please

    Wednesday, February 29, 2012 12:18 PM
  • Would you please let me know which page did this error happen on? A customized page or OOB mobile page?

           Please try :

    ·         Enabling session state to true in web config Or add “EnableSessionState="true”  to your  <%@ Page language="c#" Codebehind="  %>

    ·         Add System.Web.SessionStateModule in <httpModules> node  to see if this can solve your problem.

           Hope this can help.


    Varun Malhotra
    =================
    If my post solves your problem could you mark the post as Answered or Vote As Helpful if my post has been helpful for you.

    Thursday, March 01, 2012 5:51 AM
  • Dear Varun,

    i've already tried all things, the enable session state property is set to true in the web config file, and the module entry is added to the httpmodules section, the session state mode i have configured is InProc, please find below the entries related to sessionstate in my web config file

    <pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">

    <sessionState mode="InProc" useHostingIdentity="true" cookieless="UseCookies" />

    would you please also clarify where i should exactly add the pages entry to my <%@ Page language="c#" Codebehind="  %>, masterpage, or pagelayout ?

    please advise,

    Thank you.


    Thursday, March 01, 2012 11:20 AM
  •  

    Hi,

    From your narration, I suggest that you use the following steps to enable session state:

    1. Enter the following PowerShell command in the SharePoint 2010 Management Shell window:

    Enable-SPSessionStateService –DefaultProvision

    1. On each web application for which you want to use session state, edit the web.config file and set the enableSessionState property of the pages element as follows:

    <pages enableSessionState="true"

    For more information about how to enable asp.net session state, see

    http://blogs.msdn.com/b/markarend/archive/2010/05/27/using-session-state-in-sharepoint-2010.aspx

    Thanks,

    Rock Wang


    Rock Wang TechNet Community Support

    Friday, March 02, 2012 8:32 AM