本文介绍了为什么我在报表查看器中使Asp.Net会话过期或无法找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在使用Web应用程序中的Report Viewer控件。[ReportViewer版本11]。应用程序sessionstate模式设置为InProc,如下所示 < sessionState mode =InProccookieless =falsetimeout =20/> [我无法更改sessionstate模式和cookiless属性] 报表查看器正在运行多个工作进程。我已经实现了IReportServerConnection接口。我通过web配置文件将用户名,密码,域名和服务器URL传递给IReportServerConnection接口。 当我点击一个按钮并尝试连接到SSRS报告服务器来获取数据时,我得到了ASP .Net会话已过期或无法在reportviewer控件上找到错误消息。 Web.config文件条目如下。 < 程序集 > < add 程序集 = Microsoft.ReportViewer.Common, Version = 11.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91 / > < / assemblies > < httpHandlers > < add 动词 = * path = Reserved.ReportViewerWebControl.axd type = Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version = 11.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91 / > < / httpHandlers > < 处理程序 > < add name = ReportViewerWebControlHandler preCondition = integratedMode 动词 = * path = Reserved.ReportViewerWebControl.axd type = Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version = 11.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91 / > < / handlers > 请尽快帮忙。 提前谢谢。 此致, Rajkumar Vishwakarma 解决方案 您无法使用 sessionState mode =InProc如果您使用多个工作进程,那么工作进程将跟踪他们自己的会话集。 要么只使用一个工作进程,要么更改sessionState模式以使用状态服务或数据库。 Hi,I am using Report Viewer control in web application.[ReportViewer version 11].The applications sessionstate mode is set to InProc as follows<sessionState mode="InProc" cookieless="false" timeout="20" /> [I cannot change the sessionstate mode and cookiless properties]The report viewer is running with multiple worker process. I have implemented IReportServerConnection interface. I am passing username, password, domain name and server url via web config file to IReportServerConnection interface.When I click on a button and try to connect to the SSRS report server to fetch data, I get ASP.Net session has expired or could not be found error message on reportviewer control.Web.config file entries are as below.<assemblies> <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </assemblies><httpHandlers> <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /></httpHandlers><handlers> <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /></handlers>Please help out as soon as possible.Thank You in advance.Regards,Rajkumar Vishwakarma 解决方案 You cannot use sessionState mode="InProc" if you use more than one Worker Process because every worker process would keep track on their own set of sessions.Either use only one worker process or change sessionState mode to use either a stateservice or a database. 这篇关于为什么我在报表查看器中使Asp.Net会话过期或无法找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-01 01:19