on 2014 Jan 28 12:25 AM
I have reviewed the many articles about this subject, but have not been able to resolve it on our end.
Windows Server 2003 32 bit
Crystal Runtime for VS 2010 SP 8
ASP.NET 4.0
When using ActiveX for the PrintMode, the error:
A communication error occurred. Printing will be stopped.
The strange thing is that the same code works perfectly on a Windows Server 2008. The ActiveX control loads and the printer dialog comes up perfectly.
Things we have tried:
1. Report object is stored in the HTTP Session.
2. Compression is disabled.
3. We have tried setting session state cookieless to both true and false in the web.config
4. No proxies. The test is made directly on the web server.
5. Using Fiddler the error "Validation of viewstate MAC failed" is thrown when clicking on the printer button.
6. Process Monitor did not show any errors except for a Path Not Found:
C:\DOCUME~1\UserName\LOCALS~1\Temp\CRViewer12\PrintControl_res_en.dll
Any help would be appreciated. Again this works on a Windows Server 2008 but not on 2003.
Thank you.
Request clarification before answering.
Hi Dave,
It would suggest your app on Windows 2003 does not have access to the Viewer folder in IIS:
C:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers13
Or
C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13
Make sure it's shared and/or/both add the crystalreportviewers13 folder to your project resources.
I've also seen issues where the viewer folder gets corrupted on install. Try copying the folder from your Win2k8 PC to the Win2k3 PS. And BE SURE you are installing under a FULL Admin account.
It may also suggest your framework is not up to date or the VS 2005 C++ Security runtime is not installed.
Also, that error is a Windows error. I did a google search and found this link on MSDN:
http://social.msdn.microsoft.com/Forums/en-US/cd9c5c03-4bf3-472b-814a-cd498b190c57/validation-
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Don.
We installed the runtime using the link http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_8.zip. Tried reinstalling as well.
We granted Read/Execute rights to everyone on the crystalreportviewers13 folder to no avail.
And that link applies to web farms and clusters, which is not the case here. It is a standalone web server.
Any chance you can try to duplicate the problem on your end? It is very easy to reproduce.
Have you tried this MS Kbase:
http://support.microsoft.com/default.aspx?scid=kb;en-us;184291
What browser are you using? Did you try Compatibility mode?
I've been playing with WEB app's all morning, no issues, or at least not this one...
Don
Can you test with Firefox or IE 9 or above?
Try copying over the printControl.cab file, extract it and then manually register the printcontrol.dll
and the language cab file over also.
How about Framework updates, does your server have 4.5 and all of the FW patches installed?
I notice there is a manifest file in the language cab file, could be the cause...
Don
Hi Don,
1. With FF, we get an Export to PDF dialog, as expected.
2. Tested with IE 9 and got the same error.
3. We extracted and registered printcontrol.dll. Same error.
4. Language.cab was not found. Where is this file located?
5. The server is patched up. FW 4.5 is not supported on a Windows 2003 Server.
Rather than looking at it from "it's a CR issue" perspective, I thought I'd google the actual error you found in Fiddler:
"Validation of viewstate MAC failed"
As it turns out, there is an awful lot of information on this - most of it unrelated to CR. One of the more consistent reasons for the error is that a post back is issued from a page that has not competed rendering. In the case of a CR report, this is a relatively likely scenario as CR will display the first page of a report, but continue rendering the rest of the report behind the scenes. E.g.; just because you see a page come up, does not mean the report is actually finished rendering. And hitting the Print button, forces a post back and thus possibly the error. I suppose one way to test this is wait a bit, page to last page of the report before printing, test with only one page report.
Other suggestions. Include this in the web.config:
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" />
Ensure the web.config does not have an extra extra <form></form> tag.
I'd also urge you to google the error and see if other suggestions play out for you.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
Hi Ludek,
We will certainly continue researching this; however, the viewstate error seems to be related to a web farm or cluster, which is not our case.
I will try your other suggestions as well.
Would it be possible for you to try to see if you receive the same error by duplicating the environment? That way, we could quickly find out if this is truly an issue with CR or something else.
All that is required is a Windows Server 2003 environment and CR for VS 2010 installed. Attempt to print using ActiveX as the Print Mode.
Thank you.
Hi Ludek,
We were able to make some progress. A report that does not contain any parameters works properly on a Windows Server 2003, in that the ActiveX printer dialog gets installed and displays. If the report contains parameters, we still get the communication error message.
On a Windows 2008 server, the ActiveX print dialog appears whether or not the report contains parameters.
Thanks.
User | Count |
---|---|
77 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
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.