簡體   English   中英

傳輸到服務器時,Crystal Report數據庫登錄

[英]Crystal Report Database LogOn when transferred to Server

我該如何解決?

當我通過本地計算機運行系統時,不需要任何“登錄數據庫”身份驗證,我可以直接查看我的報告。 但是,當我將系統轉移到服務器中以便其他人可以遠程訪問它時,它需要登錄數據庫,甚至信息是正確的。 這是我的.cs代碼

public partial class PrintPreview : System.Web.UI.Page
{
    ReportDocument crPrint = new ReportDocument();
    protected void Page_Init(object sender, EventArgs e)
    {
        if (Session["ID"] == null)
        {
            Response.Redirect("../Account/LogIn.aspx");
        }
        else
        {
            string i = Session["tID"].ToString();

            //CrystalReportViewer1.Visible = true;
            string reportPath = Server.MapPath("../CrystalReport2.rpt");
            crPrint.Load(reportPath);
            crPrint.SetDatabaseLogon("sa", "Pr0cess", "172.20.3.24", "PO");
            crPrint.SetParameterValue("MOSEFNo", i);
            CrystalReportViewer1.ReportSource = crPrint;
        }



    }


}

當我將頁面傳輸到數據庫時,該頁面始終需要數據庫登錄,為什么呢?

當我將文件夾傳輸到IIS時,“ asp_client”文件夾始終為空,如何解決此問題? 謝謝!

問題是,當您重新加載頁面時,Session [“ ID”]將被重置為NULL。 嘗試檢查您的會話狀態以狀態服務器模式。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM