on 10-30-2015 11:03 AM
Hello. I'm having a problem with SAP CrystalReports during runtime.
First, the assembly file isn't found, even though CrystalReports is installed and all assemblies are registered:
System.Configuration.ConfigurationErrorsException: Could not load file or assembly 'CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\FMS\GeoPortal2\reporting\web.config line 34) ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified.
I then tried to set the CrystalDecisions.Web assembly in the project to "Copy Local"=true, so that it would be included in the deployed project. That got me a different error:
System.Web.HttpCompileException (0x80004005): c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\geo2\e2a70b87\2b9be05\App_Web_reportviewer.aspx.733fdbe7.njrhyncf.0.cs(254): error CS0433: The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\geo2\e2a70b87\2b9be05\assembly\dl3\4e808648\047538f8_8e06d101\CrystalDecisions.Web.DLL'
It looks like IIS can't find the CrystalDecisions.Web assembly in the GAC, but when the assembly is included in the project, it finds both and sees a conflict.
What could be the problem and how can I solve it?
Hi Martins
You say; the assembly file isn't found, even though CrystalReports is installed and all assemblies are registered
What version of CR did you install?
What is the actual file you used for the install?
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martinis,
SP 10 is old, upgrade to SP 15. And the first link on the download page is to integrate into VS, all others are for redist packages that you install on the app/WEB server. Do not try to distribute the CR runtime manually, it won't work....
In the \CrystalReportsViewer13 folders under WWWRoot and the install for IIS Express look for the file in the error code:
reportviewer.aspx
If it's in the viewer folder delete it and the .asp file also, they redirect to version 12 and should not have been installed.
Don
I uninstalled everything CrystalReports related on both the development machine and the web environment, then installed version 13.0.15:
* On dev machine, I used the "Support Pack 15" .exe installer
* On web app machine I used the 64bit.msi installer
I then re-built and re-deployed the code from dev machine to the web system. Still the same error ("Could not load file or assembly ").
As for "reportviewer.aspx" — I didn't quite understand what and where exactly am I suppoed to be looking for. There is no such file mentioned in the error message.
UPDATE: There is a ReportViewer.aspx file in the project, but it is actually used to display all the reports. If I delete it, I predictably get an error. If the file is invalid in some way, how do I get a correct one?
Hi Martins,
What OS are you running this on?
What version of VS are you using?
If you own that viewer aspx file don't delete it. The actual file name I was asking about is preview.aspx.
Does it work on your DEV PC?
The default is IISExpress which uses the Viewer in this folder:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETClientFiles\crystalreportviewers13
In IIS it uses the Viewer folder that is either included with the project or the default:
C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13
Look for multiple web.config files, it could be the app is loading the wrong one. Error indicates it's using this one located in that folder:
The system cannot find the file specified. (C:\Program Files\FMS\GeoPortal2\reporting\web.config line 34)
Is that the right one?
Is the 2.0->3.5 Framework installed on your IIS PC? Cr requires it.
Does a simple "Hello World" app work, not using CR runtime at all?
What account is IIS running under? Have you tried others?
On your DEV PC set the WEB Server to use your real IIS Server by changing the project properties to your startpage.aspx:
What happens?
Don
After fiddling with Web.config references some more I did manage to get it working for about a day. I don't know exactly what helped, but I removed all references to CrystalReports and then slowly added the required ones back one by one until it worked.
However, today, after making some changes elsewhere in the application (unrelated to CrystalReports), I am suddenly consistently getting the duplicate error again:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\91510cab\118f7e61\App_Web_reportviewer.aspx.733fdbe7.suglc0g9.0.cs(323): error CS0433: The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\91510cab\118f7e61\assembly\dl3\d5663533\80751e09_d9a1cf01\CrystalDecisions.Web.DLL'
This is on a Windows 10 (64-bit) dev machine, with CrystalReports 13.0.15 installed (using .exe) file and "Copy Local" is set to "False" for all CrystalReports references in the Visual Studio project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.