Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: IIS6 ASP.NET Windows , +
Here's the scenario:
 
Windows Server 2003 SP2
Hosting ASP.NET web application Framework 4.0 that uses Crystal reports Viewer to render Crystal Reports Version=13.0.2000.0
 
Yes, I have installed Crystal Reports Runtime Engine for .NET Framework 4 (32-bit)
 
I can see that all of my crystal reports render just fine when accessing the web application locally (http://localhost/myApp.aspx), but when I access the application from outside of the network, my crystal report viewer will not render the crystal reports. I do not get an exception, it just doesn't render. I have deployed this exact same web application to other servers (including Windows Server 2003) without a hitch. I am at the end of my rope and out of ideas. I have tried everything under the sun regarding permissions to the virtual directory, uninstalling and reinstalling CR Runtime, etc). Of course, I've scoured the web, maybe left the right stone unturned, you know the drill.
 
Help me, codeproject friends, you're my only hope...
 
Update: 11/22/2011: When I browse the application from within IIS, I get the following error:
 
'Sys.Application' is null or not an object
 
URL http://localhost/aspnet_client/system_web/4_0_30319/crystalreportviewers13/crviewer/crv.js
Posted 21-Nov-11 12:01pm
Edited 22-Nov-11 8:45am
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

After a lot of headaches, I was able to resolve this issue. This is what I did and how I got the issue resolved.
 

 
I installed this same .NET web application on another Windows 2008 Small Business. I did it a little differently this time, though. Instead of using the default web site in IIS for the creation of a virtual directory, I had to use the Create Web Site Wizard in IIS to generate a new database. I chose framework 4 integrated application pool, btw. I browsed to the application and once again, the crystal report viewer would not work.
 

 
Some other forum threads suggested changing your web.config and essentially telling the assembly where to find the crystalreportviewer13 runtime engine support files. This is what clued me into what exactly is going on. The crystal report viewer doesn't know how to render with out these script files, css files, etc. If it can't find the path to these files, it can't render the crystal report viewer. How I understand it is the crystal report viewer is dependent upon the runtime engine installation files for .NET Framework 4 (32 & 64 bit installs). These assembly files don't get included in your .NET project. I think that is a HUGE oversight by Visual Studio --- why not include ALL files required to run your object!?!? Sorry, anyway, here's all I did:
 

 
1) Go to the C\inetpub\wwwroot folder on any machine that has either/or crystal report runtime engine installations. For my purposes, I just went to the one on the 2008 server I'm installing on.
 
2) Copy the aspnet_client folder in the wwwroot directory.
 
3) Paste this folder in the website directory folder. I assume this would work with a web application that was created from a virtual directory as well, just paste it into the virtual directory.
 

 
You may be able to avoid this by creating all of the necessary folders and sub folders, then copying over each file into your web application project on your development machine, in order to include them in your published, complied web application. If this is confusing, just perform the steps above in the deployment environment.
 
Here's my forum post on SAP:
  Permalink  
v2
Comments
adetunji Sunmonu at 30-Jan-13 6:56am
   
Thank you. The method above worked like magic. God Bless u
jasonHall at 13-Feb-13 10:09am
   
You're welcome! I've noticed a ton of forum posts regarding this issue. I hope more people find this thread, because I've never had the problem again. I ended up actually including the aspnet_client folder (created by the CR Runtime.msi) in my project/solution folder, so that it would deploy with the project every time. I never had to worry about this issue again.
jha2 at 6-Mar-13 5:40am
   
wOw Thank you man.. it works like a charm :) God Bless you
s.amittyagi at 22-May-13 2:39am
   
thanks for share
CloudWebi at 24-Jun-13 6:53am
   
Works like charm. Thanks for sharing. Did you email Ludek (SAP CR programmer)? You should tell him since his solutions to the problem is so much more complicated.
AkoSiBudoy at 20-Feb-14 10:08am
   
Thankyou so much for sharing this kind of solution. I was almost giving up because I did also encountered this issue last night and now, my reports work fine!
elbanna at 2-Sep-14 9:39am
   
many thanks for you , I faced this problem over than one month , and just now reports working fine with me by your solution.
 
again great work , thanks
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

When you are adding Ajax Toolkit components to your website, like DLLs and the actual controls and it compiles ok but when you render the page you get no action and a javascript error. To resolve it, you need to add references at httpHandlers section in web.config.
<httpHandlers>
 <remove verb="*" path="*.asmx"/>
 <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
 <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
 <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
  Permalink  
Comments
jasonHall at 30-Nov-11 13:09pm
   
Unfortunately, this modification did not resolve the javascript error, nor did it help with my crystal reports viewer issue. I should note that I only see the javascript error when browsing the web application from IIS via the browse option. Again, the Crystal report viewer renders the reports fine when accessed locally, but from outside the network, the crystal reports do not render. This has to be some sort of network issue, right?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 DamithSL 390
1 Maciej Los 217
2 OriginalGriff 213
3 BillWoodruff 130
4 Garth J Lancaster 90
0 OriginalGriff 7,953
1 DamithSL 6,139
2 Sergey Alexandrovich Kryukov 5,449
3 Maciej Los 5,293
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 24 Sep 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100