Learn how to deploy crystal report application on production server. Why the same code works fine on development server. But get fail on production server. We would try to understand crystal report issue faced by most of the developers while deployment of crystal report apps.
I googled lot for same issue but information was scattered. And most it was not explaining exactly how to do? Before I start I would like to make excuse that I’m not so much well versed with crystal report. But still I can share collectively that can help anybody in deployment. This article deals especially with Crystal Report Assembly version 13.0.2000.0 (CR for VS 2010). But I hope it would work in any other case.
1. When we develop crystal report application on development server and test, it works fine. Because on local server assemblies required are available to application. Let us take look over code snippet of web.config, which shows assembly added for crystal report:
<assemblies> <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"> <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"> <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"> <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"> <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"> </add> </add></add></add></add></assemblies>
So these assemblies are referenced from GAC (Global Assembly Cache). But if you try to deploy same application on remote server, the application throws errors of different types because same assemblies are not there in GAC.
Many sites and knowledgeable developers share that by installing appropriate CR runtime on remote server, the problem gets resolved. You can download same according to requirements at Crystal Reports v. 9.1 to CRVS2010 Runtime Distribution.
2. If you don’t have access to remote share then you might have the problem in implementing above mentioned solution. In that case you can just copy necessary dll’s required by your application in bin folder. And it will work fine.
When we install CR for VS 2010 on PC, the assemblies needed for application gets copied to directory C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet
. As we have seen in above Web.config assemblies named, just copy those assemblies in Bin folder from above directory, and then remove the assemblies element from web.config.The application would still work nicely.
3. Sometimes application would still not work due to reasons. Solution for same:
(a) Set FULL TRUST permission on root folder.
(b) LOCAL SERVICE permission must be set on application pool.
(c) Make sure the aspnet_client folder exists in root folder.
(d) Grant modify permissions on C:\Windows\Temp from your web application or other way as CR uses that folder for storing files to display reports.