I'm sorry if this is the wrong section and should be in the IIS part, but I figured since the error only happens when running something made in Crystal that it might be the right spot.
Any, we have been in the middle of a server move from W2003 over to W2008 R2 and everything on the site works fine, except all the reports we have done in Crystal. I have tried reloading the install and even loading two newer versions, but it always gives
the same error. The big kicker to this is our web developer kind of "quit" right in the middle of all of this and I am no developer.
We always get the [COMException (0x8004100f): Database logon failed.] error. I have tried it with our old server using the new database and that is fine, so it seems the database isn't having the issue. If I open the report in Crystal it works fine - verify
the database connection and everything.
If any other information is needed I will provide what I can - I've been trying to work on this for a week and gotten no where!
Here is the error that comes up:
Server Error in '/v2' Application.
Database logon failed.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exactly the same, but instead of Throw ex is stops on Throw. If I remove the try /catch still the same error. Might need to look in the for hire section and get this figured out
I decided to check some other reports and it seems not all are broken - 9 work fine and 7 give that error. The weird part is they are all about the same - so at least that gives me some hope that it is really just something simple
Edit - well, it seems all the reports that used a DSN no longer worked and gave that error, even though the DSN was remade. Changing everything to MS OLEDB for SQL and boom, works. Not sure why they broke, but atleast there is a fix for now1
First the solution. Hope this helps. It definitely helped me resolve this issue. We need to check the Application Pool Identity settings for the web application we deployed in IIS.
Under IIS Application Pools. Check the Advanced Settings for the application pool you selected for your web application.
Make sure it runs under Administrator because Crystal reports are loaded from Windows\temp folder and we need to have rights to access this folder in order for the report to be loaded in viewer at runtime. Also make sure you have the runtime installed for
.Net Framework 4 on the server.
This setting needs to be done only if IIS is on a remote server. If IIS and Database are on same machine, this setting is not needed. The application pool can then run merely as a Local service.
Crystal reports runs fabulously both in standalone and web applications. It is easy to use and simple. I loved it until this issue came up. Tried every tip and solution suggested in various forums on the Internet developers community but to no avail.
After banging my head for over a month I found the solution by trial and error for displaying the crystal report in my web application. And I love Crystal Reports back again. :)
Even I have been victim of this Database Logon Failed Error. My web application built on .NET framework 4 and using Crystal Reports 13 with the report displaying data on the push method model was running fine on both IIS 7.5 and Visual Studio 2010. The application
was built on 64 bit machine with 32 bit application mode enabled in IIS settings. But all of a sudden started getting Database Logon message when trying to view a crystal report by accesing the application through IIS.
The report was displaying fine when running in Visual Studio but the moment I deploy the web application in IIS and browse it in Internet explorer from IIS / local server / remote client machines, crystal report refused to show up without any error. Simply
this message - "Database Logon Failed" comes up on the screen where report is supposed to come up in crystal report viewer. Initially I doubted that some data in dataset is missing thats why this message is coming. But that was not the case. I printed the
dataset on live application run in logs and checked. Data was all fine.
It is all because of IIS settings.
Database Logon Failed error was coming though I was using the push method with xsd dataset population.
I was not connecting to database at runtime either yet I was getting Database Logon Failed error.
All dataset data was coming into the report display page but somehow the report failed to show up in the Crystal report viewer.
I had the same error message with a similar scenario. One report out of 4 worked fine. The other three gave me a DB logon error. I opened the offending three reports and ran the verify DB. It prompted me for credentials again, and I provided them. Save
and compiled and now the three reports act as they should.
Member
4 Points
24 Posts
Crystal Reports + IIS 7.5 Move -> Database logon failed
Dec 13, 2011 03:40 PM|veekay|LINK
I'm sorry if this is the wrong section and should be in the IIS part, but I figured since the error only happens when running something made in Crystal that it might be the right spot.
Any, we have been in the middle of a server move from W2003 over to W2008 R2 and everything on the site works fine, except all the reports we have done in Crystal. I have tried reloading the install and even loading two newer versions, but it always gives the same error. The big kicker to this is our web developer kind of "quit" right in the middle of all of this and I am no developer.
We always get the [COMException (0x8004100f): Database logon failed.] error. I have tried it with our old server using the new database and that is fine, so it seems the database isn't having the issue. If I open the report in Crystal it works fine - verify the database connection and everything.
If any other information is needed I will provide what I can - I've been trying to work on this for a week and gotten no where!
Here is the error that comes up:
Server Error in '/v2' Application.
Database logon failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Database logon failed.
Source Error:
Source File: D:\inetpub\generic\GetParms.aspx.vb Line: 76
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.5420; ASP.NET Version:2.0.50727.5420
All-Star
120146 Points
27989 Posts
Moderator
MVP
Re: Crystal Reports + IIS 7.5 Move -> Database logon failed
Dec 14, 2011 12:16 AM|ignatandrei|LINK
replace the
throw ex
with
throw
( or better, remove all try /catch )
and make another test
Member
4 Points
24 Posts
Re: Crystal Reports + IIS 7.5 Move -> Database logon failed
Dec 14, 2011 12:03 PM|veekay|LINK
Tries, but makes no difference - still the same error -
[COMException (0x8004100f): Database logon failed.]
All-Star
120146 Points
27989 Posts
Moderator
MVP
Re: Crystal Reports + IIS 7.5 Move -> Database logon failed
Dec 14, 2011 02:25 PM|ignatandrei|LINK
and what's the line now?
Member
4 Points
24 Posts
Re: Crystal Reports + IIS 7.5 Move -> Database logon failed
Dec 14, 2011 03:10 PM|veekay|LINK
Exactly the same, but instead of Throw ex is stops on Throw. If I remove the try /catch still the same error. Might need to look in the for hire section and get this figured out
Member
4 Points
24 Posts
Re: Crystal Reports + IIS 7.5 Move -> Database logon failed
Dec 14, 2011 04:37 PM|veekay|LINK
I decided to check some other reports and it seems not all are broken - 9 work fine and 7 give that error. The weird part is they are all about the same - so at least that gives me some hope that it is really just something simple
Edit - well, it seems all the reports that used a DSN no longer worked and gave that error, even though the DSN was remade. Changing everything to MS OLEDB for SQL and boom, works. Not sure why they broke, but atleast there is a fix for now1
None
0 Points
7 Posts
Re: Crystal Reports + IIS 7.5 Move -> Database logon failed
Apr 11, 2013 12:03 PM|rsrikhakollu|LINK
I have resolved the issue by adding system odbc data source for 32 bit.
Windows/syswow64/odbc32.exe
Adding the datasource connection resolved the issue.
We should also be able to run the applicaiton on .net 4.0 framework.
None
0 Points
1 Post
Re: Crystal Reports + IIS 7.5 Move -> Database logon failed
May 08, 2014 03:01 AM|Hassan_Ahmed|LINK
First the solution. Hope this helps. It definitely helped me resolve this issue. We need to check the Application Pool Identity settings for the web application we deployed in IIS.
Under IIS Application Pools. Check the Advanced Settings for the application pool you selected for your web application.
Make sure it runs under Administrator because Crystal reports are loaded from Windows\temp folder and we need to have rights to access this folder in order for the report to be loaded in viewer at runtime. Also make sure you have the runtime installed for .Net Framework 4 on the server.
This setting needs to be done only if IIS is on a remote server. If IIS and Database are on same machine, this setting is not needed. The application pool can then run merely as a Local service.
Crystal reports runs fabulously both in standalone and web applications. It is easy to use and simple. I loved it until this issue came up. Tried every tip and solution suggested in various forums on the Internet developers community but to no avail.
After banging my head for over a month I found the solution by trial and error for displaying the crystal report in my web application. And I love Crystal Reports back again. :)
Even I have been victim of this Database Logon Failed Error. My web application built on .NET framework 4 and using Crystal Reports 13 with the report displaying data on the push method model was running fine on both IIS 7.5 and Visual Studio 2010. The application was built on 64 bit machine with 32 bit application mode enabled in IIS settings. But all of a sudden started getting Database Logon message when trying to view a crystal report by accesing the application through IIS.
The report was displaying fine when running in Visual Studio but the moment I deploy the web application in IIS and browse it in Internet explorer from IIS / local server / remote client machines, crystal report refused to show up without any error. Simply this message - "Database Logon Failed" comes up on the screen where report is supposed to come up in crystal report viewer. Initially I doubted that some data in dataset is missing thats why this message is coming. But that was not the case. I printed the dataset on live application run in logs and checked. Data was all fine.
It is all because of IIS settings.
Database Logon Failed error was coming though I was using the push method with xsd dataset population.
I was not connecting to database at runtime either yet I was getting Database Logon Failed error.
All dataset data was coming into the report display page but somehow the report failed to show up in the Crystal report viewer.
None
0 Points
2 Posts
Re: Crystal Reports + IIS 7.5 Move -> Database logon failed
Aug 26, 2014 08:08 AM|ransems|LINK
I had the same error message with a similar scenario. One report out of 4 worked fine. The other three gave me a DB logon error. I opened the offending three reports and ran the verify DB. It prompted me for credentials again, and I provided them. Save and compiled and now the three reports act as they should.