我的asp.net页面中有一个CrsytalReportView。我在Page_Load事件中设置了CrystalReportViewer的ReportSource。当我通过运行visual studio启动页面时,ReportViewer会在页面中显示报表数据。我通过http在IIS上发布了我的网站,一切正常。但是,在从IIS更改网站的 HTTPS 绑定后,“报告”页面中没有显示任何内容。
以下是一些代码:
1.我的报告页面
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterMain.Master" AutoEventWireup="true"
CodeBehind="ReportPageMain.aspx.cs" Inherits="RPS_ArchiveEditor_NEW.ReportPageMain" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph_Body" runat="server">
<CR:CrystalReportViewer ID="CrystalReportViewerMain" runat="server" AutoDataBind="true"
HasPrintButton="False" HasExportButton="False" HasDrillUpButton="False" HasDrilldownTabs="False" />
<asp:Button runat="server" ID="btnPrintReport" CssClass="PrintReportButton" OnClick="btnPrintReport_Click" Text="Çap et" />
<input type="button" id="btnGoToDefaultPage" class="PrintReportButton" value="Əsas səhifə" onclick="window.location.href='Default.aspx'" />
</asp:Content>
2. Page_Load event
protected void Page_Load(object sender, EventArgs e)
{
ReportDocument crystalReport = new ReportDocument();
if (Ajax.RoleIsAdmin())
crystalReport.Load(Server.MapPath("rptMainGridView.rpt"));
else
crystalReport.Load(Server.MapPath("rptUserGridView.rpt"));
// in this session have data, I'm absolutely sure.
List<PersonDetailsForPrint> perDetsForPrintList = Session["perDetForPrint"] as List<PersonDetailsForPrint>;
crystalReport.SetDataSource(perDetsForPrintList);
CrystalReportViewerMain.ReportSource = crystalReport;
Session["ReportSource"] = crystalReport;
}
答案 0 :(得分:2)
我发现了我的问题。我网站的物理目录中没有 aspnet_client 文件夹。我已经为.NET Framework v4.0.30319版本注册了IIS:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i