cancel
Showing results for 
Search instead for 
Did you mean: 

Database logon failed

Former Member
0 Kudos

I need to make changes to an old project developed in Visual Studio 2005.  It uses Crystal Reports XI R2 SP6.

I made changes to the code on my local computer (Windows 7) and the app worked fine, including generating some crystal reports.  I then deployed the code changes to the test server and when I run the app and get to the point where the crystal report is supposed to be created I get the error "Database login failed".

In the test environment, we have a separate test web VM and a separate test database VM.  So, to troubleshoot the issue I ran my local code but connected to the test db VM.  Everything worked fine (no db logon error).  The database connection string is stored in web.config and I use the exact same web.config on my local computer and on the test web VM.  So, although the error says that the database logon failed, I don't think the issue is at the database level especially that I don't actually see any failed logins in SQL Server itself.  So, there must be something different between my local computer and the test VM.  Here are the differences I can think of:

- IIS settings (such as application pool identity etc)

- OS: my local computer is Windows 7 and the test VM is  Windows Server 2008 R2

- my local computer is 32 bit and the test server is 64 bit

Could any of these differences cause this error to happen?

thanks,

Beata

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Beata

I will key in on this for now:


my local computer is 32 bit and the test server is 64 bit

Make sure that if you are connecting via ODBC, you are creating a 32 bit ODBC datasource. A 32 bit app will not connect to to a 64 bit ODBC datasource. See KBA: 1505620 - How to create a 32 bit ODBC data source on a 64 bit Operating System

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

Former Member
0 Kudos

Ludek,

The deployment package for this project was originally created around 2007.  The configuration in Visual Studio 2005 was set to Release/Mixed Platforms.  I think it was deployed to Windows Server 2003 32 bit.  Then, we switched to new servers we started using Windows Server 2008 R2 64 bit.  We ran the same installation package and didn't have to do anything special, at least not that I remember.  We certainly didn't have to change any data sources or make any changes to the reports themselves.  All the required dlls got installed as part of the installation package.

So now, after making some code changes I created an install package and installed it on the test server and that's when I started getting that logon failed message.  Today I change the "Target platform" in the deployment project to x64 but after deploying it I got the same error message.

Our web app uses an application pool that has "enable 32 bit applications" set to true.

I don't really want to make any changes to the reports themselves and their data sources.  I know for sure we didn't have to do it in the past when we upgraded our servers to the 64 bit version.  Is there some separate Crystal Reports runtime that needs to be installed on the 64 bit servers?  I'm looking at the installed programs on that test server and it shows:

- Crystal Reports Basic Runtime for Visual Studio 2008 (x64)

- Crystal Reports for .NET Framework 2.0 (x64)

- Crystal Reports XI R2 Service Pack 6  (no x64 listed here so it looks like this is for 32 bit)

- Crystal Reports CI R2

- Crystal Reports XI Release 2 .NET 2005 Server

Does that look correct or do I need anything else?

thanks

former_member183750
Active Contributor
0 Kudos

You don't have to / can not make any changes to the reports as far as 32 / 64 bit datasources are concerned.

One thing to consider re the bitness of things.

CR 2008 was only 32 bit. So was CR 2008.

CRVS can be both 32 and 64 bit

Application compiled as 32 bit requires 32 bit runtime, 32 bit datasources, 32 bit app pool

Application compiled as 64 bit requires 64 bit runtime, 64 bit datasources, 64 bit app pool

Application compiled as Any CPU deployed to a 32 bit OS requires 32 bit runtime, 32 bit datasources, 32 bit app pool

Application compiled as Any CPU deployed to a 64 bit OS requires 34 bit runtime, 64 bit datasources, 64 bit app pool

The fact that you have the following showing as installed:

Crystal Reports for .NET Framework 2.0 (x64)

Indicates that your app is compiled as 64 bit and you are deploying 64 bit runtime. Thus you need to configure 64 bit datasource. Note that CR XI R2 and CR 2008 were 32 bit only so no need for a 64 bit datasource.

What is the actual database and how are you connecting to it?

- Ludek

Former Member
0 Kudos

Ludek,

I was able to get rid of this "database logon failed" message.  After trying various things that did not help I realized that we were recently also testing some changes to which security protocols our servers supported and as part of these changes we disabled TLS 1.0 as well as some other protocols that are no longer considered secure.  I undid those changes (basically, made the security protocols supported to be whatever the default values were when a new VM server was provisioned) and after that Crystal Reports started working again.

thanks,

Answers (0)