Search code examples
c#asp.netcrystal-reports

Crystal Reports: Database Logon Failed


I have application in ASP.NET (C#) in which I use Sap Crystal Reports for Visual Studio. In VS everything works perfect. But when I deploy it to IIS "Database Logon Failed" error occurs. When I set CrystalReportViever "Enable Database Logon Prompting" it keeps me asking for username and password but doesn't generate an error, nor shows the report. I am setting "Enable Database Logon Prompting" for testing purpose only otherwise I sending logon parameters by ReportDocument.SetDatabaseLogon(user, password, "my dsn name", ""). Again, everything works perfect in VS. I am using: - Windows 7 Enterprise 64 bit - Visual Studio 2010 (C#) - Sap Crystal Reports, version for VS 2010 - My App pool identity in IIS is NetworkServise - I am pooling data from Oracle Stored Procedure - I am using System DSN to connect to database

I am looking forward for your answers. Thanks in advance.


Solution

  • Thank you everyone for your time.

    I used User DSN before and I had "Failed to open the connection. Failed to open the connection 'report name'.rpt" when I deployed my application. Afterwards I changed it to SystemDSN. Previous error was gone but this time "Database Logon failed" error occured.

    Finally I have solved my problem by changing connection form System DSN to Oracle Server. Everything works very well now. Consider this if you have same problem.