ASP.NET ReportViewer错误“ASP.NET会话已过期或无法找到”

时间:2022-09-29 07:17:39

My organization has an ASP.NET application which is a wrapper for our SSRS reports. This app essentially just gives users a series of dropdown menus to navigate to their reports rather than making users navigate to reports via the default SSRS report manager pages.

我的组织有一个ASP.NET应用程序,它是我们SSRS报告的包装器。此应用程序基本上只为用户提供一系列下拉菜单以导航到他们的报告,而不是让用户通过默认的SSRS报告管理器页面导航到报告。

In this application we have had users experiencing errors, specifically an error: "ASP.NET session has expired or could not be found". This was happening to users after attempting to change a report parameter and re-running the report, after only a few minutes of viewing reports.

在此应用程序中,我们遇到了用户遇到错误,特别是错误:“ASP.NET会话已过期或无法找到”。在查看报告仅几分钟后,尝试更改报告参数并重新运行报告后,用户就会发生这种情况。

I have attempted to use KeepSessionAlive="true"` within my ReportViewer control in combination with extending the Session Timeout value in our web.config. Neither of those things did the trick to resolve this error.

我试图在ReportViewer控件中使用KeepSessionAlive =“true”,并在web.config中扩展Session Timeout值。这些都没有成功解决这个错误。

1 个解决方案

#1


1  

As per the msdn article on Session-State modes available at: https://msdn.microsoft.com/en-us/library/ms178586.aspx

根据有关会话状态模式的msdn文章,请访问:https://msdn.microsoft.com/en-us/library/ms178586.aspx

We ended up switching this from the default InProc mode to StateServer mode and haven't been able to reproduce the error since. Using StateServer mode had an extra hoop to jump through though, in that we had to enable the ASP.NET State Service on our server, set it to Automatic Startup type and then update our web.config sessionState value from:

我们最终将其从默认的InProc模式切换到StateServer模式,因此无法重现错误。使用StateServer模式有一个额外的环节,但我们必须在我们的服务器上启用ASP.NET状态服务,将其设置为自动启动类型,然后从以下位置更新我们的web.config sessionState值:

<sessionState timeout="120"/>

to:

至:

<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" timeout="120"/>

#1


1  

As per the msdn article on Session-State modes available at: https://msdn.microsoft.com/en-us/library/ms178586.aspx

根据有关会话状态模式的msdn文章,请访问:https://msdn.microsoft.com/en-us/library/ms178586.aspx

We ended up switching this from the default InProc mode to StateServer mode and haven't been able to reproduce the error since. Using StateServer mode had an extra hoop to jump through though, in that we had to enable the ASP.NET State Service on our server, set it to Automatic Startup type and then update our web.config sessionState value from:

我们最终将其从默认的InProc模式切换到StateServer模式,因此无法重现错误。使用StateServer模式有一个额外的环节,但我们必须在我们的服务器上启用ASP.NET状态服务,将其设置为自动启动类型,然后从以下位置更新我们的web.config sessionState值:

<sessionState timeout="120"/>

to:

至:

<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" timeout="120"/>