使用报表查看器控件查看(SQL Server报表服务)报表时,出现“ASP.NET会话已过期”错误。有时它工作正常,有时我得到这个错误,它在Dev中正常工作,但不在测试环境中。请让我知道你是否有任何线索。提前致谢。这里是报表查看器控件的代码。查看报表时ASP.NET会话过期错误
ReportViewer1.ServerReport.ReportServerUrl = new Uri(System.Configuration.ConfigurationManager.AppSettings [“ReportServerUrl”]);
ReportViewer1.ServerReport.ReportPath = System.Configuration.ConfigurationManager.AppSettings["ReportPath"];
ReportViewer1.ServerReport.SetParameters(new List<ReportParameter> { new ReportParameter("key", "value") });
ReportViewer1.DataBind();
嗨RKP,我的答案帮助还是你仍然有问题? – WooHoo 2010-10-12 10:27:45
我正在尝试使用“ReportViewer1.LocalReport.Refresh”来解决此问题的建议,如本链接所述http://www.eggheadcafe.com/software/aspnet/31537344/aspnet-session-has-expired--请-help.aspx。我只想增加会话超时作为最后的手段。感谢您的回复。 – RKP 2010-10-12 13:02:21
祝你好运,但我的建议是不增加会话超时。这是空闲超时,即使增加会话超时,闲置超时可能会在未经常访问的系统上启动。无论如何,祝你好运。 – WooHoo 2010-10-12 21:06:41