Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
748 views
in Technique[技术] by (71.8m points)

asp.net - Crystal Report Issue with IIS - ( bobj is undefined , Crystal report not displaying )

I have crystal report 2010 installed with VS 2010.i have created a crystal report which is works fine in the localhost but the issue is once i publish my website to IIS the report is never displayed.it just display a blank page.i checked my published folder even the .rpt file is not there.can any one tell me how to resolve this issue?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Solution

The solution is to work on IIS this way:

  • Copy aspnet_client folder from c:inetpubwwwroot folder to the new website root folder.

or (first one is easier, second one is better for maintenance)

  • Create a virtual directory called aspnet_client that points to c:inetpubwwwrootaspnet_client inside the new website

Problem analysis

It's possible to analyze the problem

  • using client tools (debug window of browser)

GET http://someserver:20080/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js 403 (Forbidden)
GET http://someserver:20080/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/style.css 403 (Forbidden)

  • or server tool (IIS log , on WIN2003 is placed in %SYSTEMROOT%System32LogFilesW3SVC### on WIN2008 C:inetpublogsLogFilesW3SVC###).

2011-03-28 13:00:49 W3SVC701536 95.228.38.41 GET /aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/style.css - 20080 - 192.168.1.2 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/5.0) 403 6 64 Errore! 2011-03-28 13:00:49 W3SVC701536 95.228.38.41 GET /aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js - 20080 - 192.168.1.2 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/5.0) 403 6 64 Errore!

Cause the problem

Crystal Reports runtime is installed, but your application is not running under default web site.

  • In both cases i found that crv.js and style.css some files were not served;
  • these files are placed by CR installer in wwwrootaspnet_client folder, but for some reasons they cannot be reached;
  • In my case the reason is that i create a different website (port 20080) and aspnet_client folder is not placed inside that website

I can see that you use different versions of software and different configurations, but i think you have the same problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...