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

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
-
User1052662409 posted
enable-SPSessionStateService command is missing
Error while enabling Session State Service on SharePoint 2010
Don't need those for this issue. I just made a silly mistake. In my form directive I put the EnableSessionState="False". Now I have change sit to True
<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="ReportViewerWebForm.aspx.cs" EnableSessionState="True" Inherits="ReportViewerForMvc.ReportViewerWebForm" %>
It is working fine now.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, October 22, 2019 8:39 AM
All replies
-
User665608656 posted
Hi demoninside,
Session state has been disabled for ASP.NET. The Report Viewer control requires that session state be enabled in local mode.To solve this problem, I recommend you can open the Sharepoint PowerShell as administrator and run the following command 'Enable-SPSessionStateService -Defaultprovision'.
For more details, you could refer to this link :
If this still cannot solve your issue , you can also refer to this link :
Best Regards,
YongQing.
Monday, October 21, 2019 5:23 AM -
User1052662409 posted
Yongqing Yu
Session state has been disabled for ASP.NET. The Report Viewer control requires that session state be enabled in local modestill same result.
Yongqing Yu
SharePoint 2013: Session state has been disabled for ASP.NET. The Report Viewer control requires that session state be enabled in local mode.Not working
Monday, October 21, 2019 11:55 AM -
User665608656 posted
Hi demoninside,
SharePoint Management Shell is an enhanced version of Windows PowerShell with the SharePoint libraries preloaded. You can run SharePoint commands from Windows PowerShell, you just have to load the SharePoint libraries manually.
You could also refer to these links :
enable-SPSessionStateService command is missing
Error while enabling Session State Service on SharePoint 2010
Best Regards,
YongQing.
Tuesday, October 22, 2019 2:46 AM -
User1052662409 posted
enable-SPSessionStateService command is missing
Error while enabling Session State Service on SharePoint 2010
Don't need those for this issue. I just made a silly mistake. In my form directive I put the EnableSessionState="False". Now I have change sit to True
<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="ReportViewerWebForm.aspx.cs" EnableSessionState="True" Inherits="ReportViewerForMvc.ReportViewerWebForm" %>
It is working fine now.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, October 22, 2019 8:39 AM