OK guys, apologies if I sound lame, but, I have got to resolve this and I tried hard but now I think I need help looking at this with different set of eyes and thoughts..
Scenario:
ASP.Net application with web services (within the same domain) - C# as code behind using jQuery to call the web services.
A click of a button on the web application call a web service (within the same domain) which instructs the web service to export a crystal report to a PDF file to a directory within the same web directory (the service has permissions to write to the folder).
The web application uses windows authentication.
IIS is also configured to use windows authentication.
Problem:
When running the web application from visual studio 2010, the crystal report runs and exports the report to the required PDF file. When I host the same application on IIS 7.0, it gives me following error:
System.NullReferenceException: Object reference not set to an instance of an object. at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
When I run the crystal report in Crystal Report 2008 application, it runs successfully.
Can anyone please guide me on how to debug this one as I know the error I am getting is quite generic..
Note: There are other crystal report files connecting to a different database (other than the one with the error above) and they all export out successfully on IIS.
Any help would be greatly appreciated.
Thanks.