cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports .NET Viewer Error Database Logon prompting is in invalid state

seady5
Discoverer
0 Kudos

I have an ASP.NET 4.5 page that renders reports using the CrystalReportViewer component. It has worked great for years but has stopped working after a web server upgrade/migration to Windows Server 2019. I have the Crystal Reports Runtime engine for .NET Framework (64-bit) installed on the server. The page sets database credentials for the report but now when the report is run in this page in the browser, the user is re-prompted for credentials. Even when correct credentials are entered, the following error is returned: Database Logon prompting is in invalid state.

Accepted Solutions (1)

Accepted Solutions (1)

seady5
Discoverer

This turned out to be a problem with the web server using only TLS 1.2, which is a PCI compliance requirement. The existing reports were using the provider Microsoft OLE DB Provider for SQL Server (SQLOLEDB) which is not compatible with that cipher. I had to switch all the reports to use the provider Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL). Note that very subtle difference in the description! ("Driver" vs "Provider"). If needed, that driver can be downloaded directly from Microsoft at https://aka.ms/downloadmsoledbsql.

I could not figure out how to make the change programmatically in my viewer, so I had to touch every report. Luckily I only had about 75.... I'll pass that challenge on to someone else!

robert_willson
Explorer
0 Kudos

I am running into this same problem with Windows Server 2022 Datacenter Azure Edition, using Microsoft SQL 15.0.4198.2

I tried using MSOLEDBSQL, however I am still not able to log into the SQL server from the ASP.NET page.

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

Which service pack of the SDK was used to develop the application? Did you install the same service pack when you upgraded the server? That may be the problem. Win Server 2019 was not supported until SP26, which came out either late last year or earlier this year. However, you can't just upgrade the runtime to that version. Your application will have to be recompiled with the new version of the SDK as well (development version and runtime version should match...) You can find links to the latest version (currently SP27 with SP28 due out sometime next month) from the wiki here.

-Dell

seady5
Discoverer
0 Kudos

Thanks for your quick reply and time trying to help. I looked into your suggestion first, but I was using SP27 and everything was a fresh install with that version. I posted the answer I finally figured out.