locked
Session state has been disabled for ASP.NET. The Report Viewer control requires that session state be enabled in local mode. RRS feed

  • Question

  • User1052662409 posted

    Hi All,

    There is a report section in my MVC application. When I try to get report by putting break-pint it all goes  alright but when It redirects to another tab it shows error

    Session state has been disabled for ASP.NET.  The Report Viewer control requires that session state be enabled in local mode.

    I looked for the solution and found some code to fix it. But still the same result. The solution I found on google is to modify webconfig with some following tags.

    <pages enableSessionState="true"  validateRequest="false" />
    
    <httpModules>
          <add name="Session" type="System.Web.SessionState.SessionStateModule" />
        </httpModules>
     <sessionState mode="InProc" cookieless="false" timeout="20"/>
    <system.webServer>
        
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="Session" />
          <add name="Session" type="System.Web.SessionState.SessionStateModule"
          preCondition="" />
        </modules>
      </system.webServer>

    Please suggest.

    Friday, October 18, 2019 9:50 AM

Answers

All replies