on 10-29-2009 8:49 PM
Hi Support \ Community
I have an issue that is presenting it self on my production server. When I try to load my report on a page with CRViewer I get the below message on the page with the viewer. I installed both Redist for x86 & x64 bit. But keep receiving the same issue. Thanks for your help in advance.
Let me know if you need any other info to help me resolve this issue.
Page Error:
The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
-
System Event Log : System is Windows 2008 web server with SP2 and 64bit.
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 10/25/2009 11:04:05 PM
Event ID: 1334
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: u15356492
Description:
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/26579/ROOT
Process ID: 3504
Exception: System.TypeInitializationException
Message: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
StackTrace: at CrystalDecisions.CrystalReports.Engine.ReportDocument.Finalize()
InnerException: System.UnauthorizedAccessException
Message: Retrieving the COM class factory for component with CLSID {5FF57840-5172-4482-9CA3-541C7878AE0F} failed due to the following error: 80070005.
StackTrace: at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="49152">1334</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2009-10-26T05:04:05.000Z" />
<EventRecordID>5041</EventRecordID>
<Channel>Application</Channel>
<Computer>u15356492</Computer>
<Security />
</System>
<EventData>
<Data>An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/26579/ROOT
Process ID: 3504
Exception: System.TypeInitializationException
Message: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
StackTrace: at CrystalDecisions.CrystalReports.Engine.ReportDocument.Finalize()
InnerException: System.UnauthorizedAccessException
Message: Retrieving the COM class factory for component with CLSID {5FF57840-5172-4482-9CA3-541C7878AE0F} failed due to the following error: 80070005.
StackTrace: at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()</Data>
</EventData>
</Event>
What is the version of the CR assembly crystaldecisions.crystalreports.engine.dll referenced in your project?
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See if the web application directory is configured for the correct framework. E.g.; not 1.1.
If that does not help, download Process Monitor from here:
http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx
Filter it for your process and save the log once you get he error. Then search for any errors like Access Denied, File no Found, etc.
Ludek
Hi Ludek,
I have attached the csv file with what I found. see if you find anything please. I'm also reviwing my self....
Here is a link to my msn skydrive hope you can download.
http://cid-c4634436ac888e03.skydrive.live.com/self.aspx/.Public/CrystalReports/CRIssue.CSV
Hi Edgar. Love the idea of sharing the csv as you did. One day, it may even be possible to attach these in here directly. But that is another story...
I looked at the file and the following is interesting;
C:\Program Files (x86)\Business Objects\Common\2.8\bin\sacommlayer.dll ACCESS DENIED
C:\Program Files (x86)\Business Objects\Common\2.8\bin\sacommlayer.dll ACCESS DENIED
C:\Program Files (x86)\Business Objects\Common\2.8\bin\sacommlayer.dll FAST IO DISALLOWED
C:\Program Files (x86)\Business Objects\Common\2.8\bin\sacommlayer.dll ACCESS DENIED
C:\Program Files (x86)\Business Objects\Common\2.8\bin\sacommlayer.dll ACCESS DENIED
C:\Program Files (x86)\Business Objects\Common\2.8\bin\sacommlayer.dll ACCESS DENIED
See line 13436 +
The app should be accessing a whole slew of files from that folder, but appears to just quit trying after not being able to access the sacommlayer.dll. I am not sure what's up with that, but see if giving the process rights to the folder will help.
Other than that, we'll have to continue next week as I'm outta here.
Have a great weekend,
Ludek
Hi Ludek,
I was able to fix the original message (with your help of couse.) by adding the IIS credentials to that folder but now I'm receiving the LOAD REPORT FAILED error. Here are some of the stuff I have done already to try to fix the issue.
1. I double check and did see that when I try to run the reports on the webapp the engine creates files in the C:\Windows\Temp folder but anyways I added IIS credentials like I did in the Program Files (x86) folder. I did noticed that they are not cleared or disapear once the web app is closed. Not sure if this is how it should work or because of the error message the process is not cleaning up correctly.
Also
2. I did a reinstall of the x86 redistributable. I have not tried yet for 64 bit redist but will try and update if this fixes anything.
Hope this info help you. I reviewed the Event Log and also tried the process monitor and did not see anything but let me know what you need so I can get it for you.
Thanks,
Edgar
I think you are on the right track re the permissions. You do need read write permissions on the temp folder. Right now, it looks like the read permissions may not be there. E.g.; the process is writing the temp files, but is not able to read them, thus the load report error (the runtime does not use the original report file as such, it only uses the temp files). The fact that these files are not deleted makes sense as the process is terminated before clean up is initiated. It is also possible that there is no delete rights on the folder. Process Monitor should help here again as it will tell you at what point the process is having issues reading the temp rpt. Not sure if the 64 bit runtime will do anything for you. Depends on how the app was compiled - if as 64 bit, you need the 64 bit runtime. If as 32 bit, then 32 bit runtime will do the trick.
Ludek
Hi Ludek,
Here is the process monitor info. Hope you can find something helpful.
Thanks,
Edgar
Right click on the Application Pool and select u201CAdvanced Settingsu2026u201D or select the same from the Actions pane after selecting the Application pool
Change the u201CEnable 32-bit Applicationsu201D to True (if you want the application pool to spawn in a 32-bit mode)
Click OK
Below is how you do from the AppCmd:
appcmd apppool set /apppool.name:MyAppPool32bit /enable32BitAppOnWin64:true
appcmd apppool set /apppool.name:MyAppPool32bit /enable32BitAppOnWin64:false
NOTE : By default, it is false.
Ludek
Hi Ludek,
Here is what I have tried so far.
1. I did the AppPool you requested and it was already set to 32-bid.
2. I tried changing the working folder from C:\Windows\Temp to D:\Temp via Crystals registry setup (the setup was empty so I added the new location) but it did not take even after I restarted.
I saw that the AppPool settings shows the user IWSP_ etc that the the web app uses, I was thinking of maybing changing to some other that I would think have more rights. What do you think? or what else can I try?
Thanks,
Edgar
Hmm. Does not look like we're getting closer to a resolution. It may be time to obtain phone support from here;
Or maybe someone else can add their ideas.
Ludek
Hi Ludek,
I found the problem. But now I have another issue. My developer system is using SQLExpress and my production system the full SQL Server so naming are the similar. I'm trying to figure out how to connect via code or not sure if you have any other ideas? Let me know if you can help and if you need more details about my project.
Thanks,
Edgar
You should be able to connect to any other database as long as you are using the same connection type and the database schema matches. The first place to start is in the designer though. Can you change the datasource there? If not, then you will not be able to do it at runtime. if you can change the datasource in the designer, use the code as in the samples [here|https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples]. Use vbnet_win_dbengine sample app.
Ludek
Hi Ludek,
Thanks for all your help.
FYI for your records the original issues was fixed when I changed the default web site credential to use an alternate that had more rights and my second issue I just changed the code to use the ReportDocument object and then used the setDatabaseLogon property.
thanks again.
Edgar
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.