cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports .NET Viewer Error Database Logon for Windows Server 2022

robert_willson
Explorer
0 Kudos

Rendering an ASP.NET page using CrystalReportViewer component does not work with Windows Server 2022 Datacenter Azure Edition, using Microsoft SQL 15.0.4198.2. 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.

Based on a similar question from 2020, but this is for a new version of Windows and the old answer did not work. I am using Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) for my database connection.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

That old OLEDB provider doesn't work properly, use MS SQL Native 11 or ODBC 17 to connect.

Note: ODBC 18 is not currently supported.

Also note MS 2022 Server is not currently listed under supported platforms:

https://www.sap.com/documents/2016/06/f871031e-757c-0010-82c7-eda71af511fa.html

Answers (3)

Answers (3)

kevin-l
Member
0 Kudos

I had this exact same issue. I developed my ASP.NET application on Windows 11, and when I deployed it to Windows Server 2022 I had the same issue as described here. I verified that I had the correct runtime installed for my CR4VS version (SP33 in my case), and that all other applications settings were correct first.

I finally got everything working by switching my System DSN odbc connection to the 64 bit "SQL Server Native client 11.0". I originally set up the 32 bit SQL driver since that worked fine on my Windows 11 box, but that apparently was an issue on the Windows Server 2022 box. Switching it to 64 bit made everything work again. Yay!

I also noted that running IIS on windows server 2022 is not listed as an officially supported platform, but so far so good :shrug:

Hopefully this helps someone else that faces this issue.

robert_willson
Explorer
0 Kudos

The above message is what I am getting. It will allow me to connect with admin credentials, but usually this is not required. On the older server the page already had credentials loaded. Also, this page is being hosted by a different server (apsaz-sage) than the sql server (apsaz-sql1). I tried this again by hosting the page on the sql server and it worked.

DellSC
Active Contributor
0 Kudos

Is there an error number in the error message? If so, this is probably coming from the database and might give you more information about what needs to be updated.

Also, which Service Pack of the SDK are you using - both in Visual Studio and on the web server, if you've published your application? The SP number will be in the name of the file you used to install the SDK.

-Dell