Crystal Reports:连接到SQL Server错误

时间:2018-07-27 15:23:59

标签: crystal-reports crystal-reports-2008

在我们的计算机上(Windows Server 2012R2),我们有一个ASP.net网站,该网站使用Crystal Reports(2008)生成某些报告。该数据库是SQL Server2014。这是与错误相关的代码:

    ConnectionInfo cnnInfo = new ConnectionInfo();
    cnnInfo.ServerName = serverName;
    cnnInfo.DatabaseName = dbName;
    cnnInfo.UserID = userId;
    cnnInfo.Password = password;

    ReportDocument rd = new ReportDocument();
    rd.Load(rptUrl);
    RptViewer.ReportSource = rd;

    CrystalDecisions.CrystalReports.Engine.Database rptDb = rd.Database;

    TableLogOnInfo tblLogOnInfo = new TableLogOnInfo();
    foreach (CrystalDecisions.CrystalReports.Engine.Table tbl in rptDb.Tables)
    {
        tblLogOnInfo = tbl.LogOnInfo;
        tblLogOnInfo.ConnectionInfo = cnnInfo;
        tbl.ApplyLogOnInfo(tblLogOnInfo);
        tbl.Location = tbl.Location.Substring(tbl.Location.LastIndexOf(".") + 1);
    }

这是在此行发生的错误:

tbl.Location = tbl.Location.Substring(tbl.Location.LastIndexOf(“。”)+ 1);

Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (SECCreateCredentials()).]SSL Security error.
SQL State: 08001
Native Error: Error in File C:\Windows\TEMP\EventByEventTypeCrossTab {FC74CD56-B1FF-4B06-9566-B927D660617D}.rpt:
Unable to connect: incorrect log on parameters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (SECCreateCredentials()).]SSL Security error.
SQL State: 08001
Native Error: Error in File C:\Windows\TEMP\EventByEventTypeCrossTab {FC74CD56-B1FF-4B06-9566-B927D660617D}.rpt:
Unable to connect: incorrect log on parameters.

请注意,使用相同的数据库帐户读取数据库并在浏览器中显示信息没有任何问题。

我该如何解决?

1 个答案:

答案 0 :(得分:0)

我终于开始工作了。这是我所做的:

升级到.NET Framework 4.7.2

为.NET Framework 4安装CR

按照此链接中的解决方案进行操作: https://community.ipswitch.com/s/article/How-to-resolve-SSL-Security-error-and-SECCreateCredentials-failures-in-Admin-Console-and-ODBC-connections-after-disabling-SSL-and-TLS1-0-protocols-on-the-WhatsUp-Gold-server

重新启动服务器。

相关问题