cancel
Showing results for 
Search instead for 
Did you mean: 

Database Logon Error when app pool setting Enable 32-bit Application is set to False

0 Kudos

Hello SAP team,

Since couple of days I have been working on some crystal reports that use InterSystems 32-bit ODBC driver to connect to the InterSystems Cache database.

The reports work fine when I upload them to our .NET Web Application on local PC, Development, and Test Servers, whereas I get a "Database Logon Error" when I upload the reports to the web application on the Production server. While troubleshooting this issue, I noticed that the only difference between, DEV, TEST, and PROD servers's application pool was the setting "Enable 32-Bit Applications".

We requested to set the application pool's setting "Enable 32-Bit Applications" to "True" on PROD server, but then the whole application went down. I got the following error message:

Parser Error Message: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x8013104

I tried to remove/comment-out the following reference in the application's Web.Config

<add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />

Now, the application is up and running on DEV and TEST servers, but pn PROD server when I try to run a report from the web application, I get the following error (also attached):

I am sure that there are some differences in the way PROD environment is set up when compared to the DEV and TEST environments. I found the following article by David Hilton:

log4net.dll and other errors like CrystalDecisions.ReportAppServer.*

In the article, David asked mentioned to a user that:

Either your application pool is set to 32 bit and you deployed the 64 bit version of Crystal Reports for VS 2010.

or, your application pool is set to 64 bit and you deployed the 32 bit version of Crystal Reports for VS 2010.

I tried to reach out to the server team and asked them to verify if the Global Assembly Cache has the assembly for log4net on PROD server. They responded saying "log4net" assembly is available on TEST server (shown in below image), but NOT on PROD server.

My questions now are:

1. If log4net assembly is not available in the GAC folders on PROD, then correct version of CR runtime was not installed on the server? Does CR runtime installation setup add this log4net assembly to the GAC folder?

2. Why does CR viewer need log4net? What is the connection between them? Is it necessary to have a reference to log4net assembly if the web application uses crystal report viewer?

3. In the beginning, the PROD server and the reports (using OLEDB) on it were working very well when we had the app pool setting "Enable 32-bit Application" set to "False". Now, when it is set to "True" we are getting the log4net assembly error. How does this setting affect the Crystal Reports and the CR runtime used by the application on the server?

4. The reports using InterSystems 32-bit ODBC drivers are working ONLY when "Enable 32-bit Application" is set to "TRUE" on the server. If it is set to "False" then I am getting a "Database Logon Error". Do we need to have to set "Enable 32-bit Application" to TRUE in order to make the reports (using 32-bit ODBC) work? We are not getting this error for reports using and OLE DB provider to connect to SQL server.

I know I have asked many questions, but I would greatly appreciate if someone can answer these questions.

Last but not the least, the servers we use are 64-bit and I am not sure what version of CR runtime is installed on them. I am working with the server team to find out the version using the following article:

Determine if CR Runtime is Installed ?

Thank you,

Masood

0 Kudos

FYI, server team just confirmed that the TEST server has both 32 and 64-bit CR runtime engines installed, whereas on PROD server only 64-bit version is installed. I hope this information helps.

Thanks,

Masood

Accepted Solutions (0)

Answers (0)