Skip to Content

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

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jul 30, 2020 at 05:20 AM

    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

    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!

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 29, 2020 at 09:18 PM

    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.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.