Click here to Skip to main content
15,887,965 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi All,
Hope all you are doing well.
I am getting stuck with below problem.
I have created a ASP.net Application and use Crystal report to generate report in PDF format.
When I run the code it is working fine on ASP.NET inbuilt server and generated the PDF file.
But when I've deployed the site on My Local IIS server and try to generate PDF then it showing below Error:

System.Runtime.InteropServices.COMException (0x800002F4): Failed to open the connection. Failed to open the connection. Payroll {E077DA72-5194-440B-AD1C-F777039C0E5E}.rpt at CrystalDecisions.ReportAppServer.Controllers.RowsetControllerClass.CreateCursor(ISCRGroupPath GroupPath, RowsetMetaData MetaData, Int32 Reserved) at CrystalDecisions.ReportAppServer.CrystalReportDataView.EnsureDataTableIsFilled() at CrystalDecisions.ReportAppServer.CrystalReportDataView.get_DataView() at CrystalDecisions.ReportAppServer.CrystalReportDataView.get_InternalCollection() at CrystalDecisions.ReportAppServer.CrystalReportDataView.get_Count() at SessionalWorker_Reports.btnDownload_Click(Object sender, EventArgs e)

I have Set up DSN in ODBC data sources (32-bit) to connect crystal report with DB.

It is working in ASP.NET inbuilt server, but not working after deploying to my local IIS server.

If I changed IIS Server setting that is
Application Pool--><<Sitename>>-->Advanced Setting-->Identity-->Add Custom Account[provide system username,password]
and then run the site from IIS then its working and PDF is generated.

But I can't provide the custom Account Identity under Application.
There is some authentication setting problem.

Crystal Reports version 13.0, .NET 4.0, SQL Server 2008 Express, VS 2012.

Any help would be much appreciated.
Posted

1 solution

Hi, I found the solution by creating DSN in ODBC data sources (64-bit) to connect crystal report with DB.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900