【发布时间】:2017-07-31 09:56:06
【问题描述】:
我已在“windows server 2010”中发布了我的 Web 应用程序。我所有的水晶报表都运行良好。
问题是:几个小时后,所有水晶报告显示空白页。当我重新启动 IIS 时,它又开始工作了。
水晶报表.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/ASPNetForms/SiteMaster.Master" AutoEventWireup="true" CodeBehind="CrystalForm.aspx.cs" Inherits="WebApplication.ASPNetForms.CrystalForm" %>
CrystalForm.aspx.cs
protected void Page_Init(object sender, EventArgs e)
{
try
{
string strReportName = Session["ReportName"].ToString();
var rptSource = Session["rptSource"];
var xmlPath = Session["xmlPath"];
ReportDocument rd = new ReportDocument();
string strRptPath = Server.MapPath("~/") + "XML\\" + strReportName;
rd.Load(strRptPath); //Loading Report
rd.SetDataSource(rptSource);
CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
CrystalReportViewer1.HasCrystalLogo = false;
CrystalReportViewer1.ReportSource = rd;
}
catch (Exception ex)
{
string exception = ex.Message;
}
}
【问题讨论】:
标签: asp.net asp.net-mvc-4 crystal-reports