Crystal Reports图像在Web查看器中不可见

时间:2021-12-23 00:26:56

I have some Crystal Reports (V10) in an application (.NET 1.1) I inherited that is deployed in four "identical" environments. In three of the environments, they are working fine. In the fourth, the chart graphics are not visible in the web viewer. They are visible if you export the reports.

我在一个应用程序(.NET 1.1)中有一些Crystal Reports(V10),我继承了它,它部署在四个“相同”的环境中。在三种环境中,它们运行良好。在第四个中,图表图形在Web查看器中不可见。如果导出报告,则可以看到它们。

The IT guys swear everything is exactly the same in all four environments and have kicked the problem back to me to solve. I'm not sure how I'm going to do that since I can't get to the servers to check anything for myself. But I don't see how this can NOT be an environment issue.

IT人员发誓所有四种环境中的一切都完全相同,并将问题提交给我解决。我不确定我将如何做到这一点,因为我无法到服务器为自己检查任何东西。但我不明白这不是一个环境问题。

It seems to me that Crystal has the necessary permissions to write the file and to retrieve it to render the export versions of the report, but the ASP WP can't access the graphic file when the page is rendered.

在我看来,Crystal具有编写文件和检索文件以呈现报告的导出版本的必要权限,但ASP WP在呈现页面时无法访问图形文件。

Thanks for any suggestions you might have to help me!

感谢您提供的任何建议,帮助我!

RESOLUTION From the IT guys: "We had to change the “Execute Permissions” on the CrystalReportsViewer10 folder within IIS from “Scripts only” to “Scripts and executables”. All of the other sites have only “Scripts Only” and they’re fine."

解决方案来自IT人员:“我们必须将IIS中的CrystalReportsViewer10文件夹中的”执行权限“从”仅脚本“更改为”脚本和可执行文件“。所有其他站点只有”仅脚本“,它们很好“。

5 个解决方案

#1


There needs to be an IIS virtual directory called something like "CrystalReportViewers115". I think that the exact name changes between versions. This needs to be visible to your ASP.NET user. Start looking at the environments that work and see if they have this virtual directory installed, and compare it to the one on the failing environment. As another check, you should be able to enter in the URL for the images into a browser and see them. To find out the URL, right click on the picture and select "Properties". For example:
http://localhost/crystalreportviewers/images/toolbar/export.gif
You should see the picture when you browse directly to the URL.

需要一个名为“CrystalReportViewers115”的IIS虚拟目录。我认为版本之间的确切名称会发生​​变化。这需要您的ASP.NET用户可见。开始查看有效的环境,看看他们是否安装了此虚拟目录,并将其与故障环境中的目录进行比较。作为另一项检查,您应该能够将图像的URL输入浏览器并查看它们。要找到URL,请右键单击图片并选择“属性”。例如:http://localhost/crystalreportviewers/images/toolbar/export.gif当您直接浏览到URL时,您应该看到图片。

#2


I could resolve this issue in dev enviroment adding next keys (handlers) to web.config:

我可以在开发环境中将下一个键(处理程序)添加到web.config来解决此问题:

<system.webServer>
  <handlers>
    <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
  </handlers>
</system.webServer>


<system.web>
  <httpHandlers>
    <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
  </httpHandlers>
</system.web>

#3


Go to Start->Programs->Microsoft Visualstudio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt

转到开始 - >程序 - > Microsoft Visualstudio 2008-> Visual Studio工具 - > Visual Studio 2008命令提示符

and type

aspnet_regiis -c


This will automatically copied the corresponding files...

这将自动复制相应的文件......

#4


Add the aspnet_client folder in the source folder of the site. Example:

在站点的源文件夹中添加aspnet_client文件夹。例:

C:\inetpub\wwwroot\myapplication\aspnet_client\system_web\4_0_30319\CrystalReportWebFormViewer4

#5


I recently experienced this very issue: although my resolution was a little different:

我最近经历过这个问题:尽管我的解决方案有点不同:

  • I tried setting the handler in the web.config but that didn't fix it.
  • 我尝试在web.config中设置处理程序但是没有修复它。

  • I tried setting scripts & executables in IIS but that didn't fix it.
  • 我尝试在IIS中设置脚本和可执行文件但是没有修复它。

Once I went into the C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10 folder and turned off custom errors I could see the error was coming from an access denied issue on C:\Windows\Temp\

一旦我进入C:\ Program Files \ Common Files \ Crystal Decisions \ 2.5 \ crystalreportviewers10文件夹并关闭自定义错误,我可以看到错误来自C:\ Windows \ Temp \上的访问被拒绝问题

The solution was then to not and handlers or alter IIS to run scripts and executables, it was to allow the Network Service to read permission on C:\Windows\Temp\

然后解决方案是不处理或更改IIS以运行脚本和可执行文件,它允许网络服务读取C:\ Windows \ Temp \的权限

EDIT: Think I've found another solution which doesn't require permission changes... just set a virtual directory for aspnet_client; the level at which you select this will very much depend on your IIS layout.

编辑:想想我发现了另一个不需要更改权限的解决方案......只需为aspnet_client设置一个虚拟目录;您选择此项的级别将在很大程度上取决于您的IIS布局。

#1


There needs to be an IIS virtual directory called something like "CrystalReportViewers115". I think that the exact name changes between versions. This needs to be visible to your ASP.NET user. Start looking at the environments that work and see if they have this virtual directory installed, and compare it to the one on the failing environment. As another check, you should be able to enter in the URL for the images into a browser and see them. To find out the URL, right click on the picture and select "Properties". For example:
http://localhost/crystalreportviewers/images/toolbar/export.gif
You should see the picture when you browse directly to the URL.

需要一个名为“CrystalReportViewers115”的IIS虚拟目录。我认为版本之间的确切名称会发生​​变化。这需要您的ASP.NET用户可见。开始查看有效的环境,看看他们是否安装了此虚拟目录,并将其与故障环境中的目录进行比较。作为另一项检查,您应该能够将图像的URL输入浏览器并查看它们。要找到URL,请右键单击图片并选择“属性”。例如:http://localhost/crystalreportviewers/images/toolbar/export.gif当您直接浏览到URL时,您应该看到图片。

#2


I could resolve this issue in dev enviroment adding next keys (handlers) to web.config:

我可以在开发环境中将下一个键(处理程序)添加到web.config来解决此问题:

<system.webServer>
  <handlers>
    <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
  </handlers>
</system.webServer>


<system.web>
  <httpHandlers>
    <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
  </httpHandlers>
</system.web>

#3


Go to Start->Programs->Microsoft Visualstudio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt

转到开始 - >程序 - > Microsoft Visualstudio 2008-> Visual Studio工具 - > Visual Studio 2008命令提示符

and type

aspnet_regiis -c


This will automatically copied the corresponding files...

这将自动复制相应的文件......

#4


Add the aspnet_client folder in the source folder of the site. Example:

在站点的源文件夹中添加aspnet_client文件夹。例:

C:\inetpub\wwwroot\myapplication\aspnet_client\system_web\4_0_30319\CrystalReportWebFormViewer4

#5


I recently experienced this very issue: although my resolution was a little different:

我最近经历过这个问题:尽管我的解决方案有点不同:

  • I tried setting the handler in the web.config but that didn't fix it.
  • 我尝试在web.config中设置处理程序但是没有修复它。

  • I tried setting scripts & executables in IIS but that didn't fix it.
  • 我尝试在IIS中设置脚本和可执行文件但是没有修复它。

Once I went into the C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10 folder and turned off custom errors I could see the error was coming from an access denied issue on C:\Windows\Temp\

一旦我进入C:\ Program Files \ Common Files \ Crystal Decisions \ 2.5 \ crystalreportviewers10文件夹并关闭自定义错误,我可以看到错误来自C:\ Windows \ Temp \上的访问被拒绝问题

The solution was then to not and handlers or alter IIS to run scripts and executables, it was to allow the Network Service to read permission on C:\Windows\Temp\

然后解决方案是不处理或更改IIS以运行脚本和可执行文件,它允许网络服务读取C:\ Windows \ Temp \的权限

EDIT: Think I've found another solution which doesn't require permission changes... just set a virtual directory for aspnet_client; the level at which you select this will very much depend on your IIS layout.

编辑:想想我发现了另一个不需要更改权限的解决方案......只需为aspnet_client设置一个虚拟目录;您选择此项的级别将在很大程度上取决于您的IIS布局。