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.

View Entire Topic
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.