Development Environment: vs2008 and Crystal Report 2008
The developed website does not use the system's default wwwroot directory, but creates another Directory D: \ published as the directory of the website.
Using Crystal report2008 to develop reports in vs2008, the display is normal, but when published to the website, the Crystal Report page does not have images, such as, but works normally.
Find the cause, analyze the webpage source code, and find the Code as follows:
<Table cellspacing = 0 cellpadding = 0> <tr nowrap>
<TD nowrap width = 8> & nbsp; </TD> <TD nowrap width = 22px> <input type = "image" name = "crystalreportviewer1 $ ctl02 $ ctl00" Disabled = "disabled" Title = "Export" src =" /aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/export.gif "onmouseover =" this. src = '/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/export_over.gif' "onmouseout =" this. src = '/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/export.gif' "style =" height: 22px; width: 22px; border-width: 0px; "/> </TD>
<TD nowrap width = 8> & nbsp; </TD> <TD nowrap width = 22px> <input type = "image" name = "crystalreportviewer1 $ ctl02 $ ctl01" Disabled = "disabled" Title = "print" src =" /aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/print.gif "onmouseover =" this. src = '/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/print_over.gif' "onmouseout =" this. src = '/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/print.gif' "style =" height: 22px; width: 22px; border-width: 0px; "/> </TD>
<TD nowrap width = 8> & nbsp; </TD> <TD nowrap width = 22px> <input type = "image" name = "crystalreportviewer1 $ ctl02 $ ctl03" Disabled = "disabled" Title = "show/hide group tree "src ="/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/grouptree.gif "onmouseover =" this. src = '/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/grouptree_over.gif' "onmouseout =" this. src = '/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/grouptree.gif' "style =" height: 22px; width: 22px; border-width: 0px; "/> </TD>
According to the source code, it is estimated that the website did not find image resources, so it returned to the website release directory, the directory does not contain resources such as "/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/export.gif ".
The reason why IIS does not have such resources is that the crystal report web service is not installed or is not registered in IIS.
The common solution to this problem is:
Code
Install crystal report Web Service: it is automatically registered through vs. net.
Register: first enter the msdos mode (you can choose "start"> "Run...", type cmd, and press Enter ).
Set c: \ windows \ microsoft. net \ framework \ v1.0.3705 as the current directory, where C: \ WINDOWS depends on the operating system installation location, v1.0.3705 depends on the installation.. NET Framework version.
Type aspnet_regiis-I.
Finally, a crystalreportwebformviewer web shared directory appears in IIS.
In my case, I think I didn't use the default IIS website, but I didn't have this folder in my release directory. So I first searched for it in c: \ Inetpub \ wwwroot and found C: \ Inetpub \ wwwroot \ aspnet_client \ system_web \ 2_0_50727 \ crystalreportwebformviewer4
I just want to copy it to my vs2008 development project,
Re-compile and release, so the missing directory resources appear in my release directory. Re-run the website and a picture is displayed.