我已经用 C# 编写了一个报告和一个简单的 Web 程序,它正在调用该报告。当我运行该程序时,它在 Firefox 中完美运行,但在 IE 8.0 中却不行。在 IE 中,它会一直运行,直到您收到以下错误消息:底层连接已关闭:接收时发生意外错误。无法从传输连接读取数据:现有连接被远程主机强行关闭。现有连接被远程主机强行关闭。
任何人以前都遇到过这个问题并有解决方案。
提前感谢所有回复的人!
生成报告的代码: ReportViewer1.ProcessingMode = ProcessingMode.Remote;
ServerReport serverReport = ReportViewer1.ServerReport;
// Set the report server URL and report path
serverReport.ReportServerUrl =
new Uri("http://localhost/Reportserver");
serverReport.ReportPath =
"/WinLife.Accounting.Report/Report_Accountingvoucher";
// Create the sales order number report parameter
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("Workplace", Session["WorkPlace"].ToString()));
paramList.Add(new ReportParameter("BookkeepingYear", Session["BookkeepingYear"].ToString()));
paramList.Add(new ReportParameter("SerialNo", Session["SerialNo"].ToString()));
paramList.Add(new ReportParameter("DocumentType", Session["DocumentType"].ToString()));
paramList.Add(new ReportParameter("IndentDate", Session["IndentDate"].ToString()));
paramList.Add(new ReportParameter("AccountingVoucherCode", Session["AccountingVoucherCode"].ToString()));
paramList.Add(new ReportParameter("UserId", Session["UserId"].ToString()));
paramList.Add(new ReportParameter("Password", Session["Password"].ToString()));
ReportViewer1.ServerReport.SetParameters(paramList);
ReportViewer1.ServerReport.Refresh();
如果我在 IE8 中运行 reportviewer,它看起来还不错。报告服务器,sql-server 安装在我的机器上。我从 VS2008 以调试模式运行程序,并且安装了 Windows 7。我试图在受信任的站点中设置本地主机,但它没有改变任何东西。似乎它在 SQL-Server 中执行任何操作之前就被停止了。这适用于 Firefox。