ASP.NET图表控件不工作生产服务器上 [英] ASP.NET Charting Control not working on production server

查看:107
本文介绍了ASP.NET图表控件不工作生产服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有严重依赖于图表和目前的图表将在ASP.Net开发服务器运行一个应用程序,但是当我尝试发布到我的服务器(赢2008服务器R2中,IIS 7),图表不出现。

I have an application that relies heavily on charting and currently the charts will work in the ASP.Net Development Server, but when I try to publish out to my server (Win 2008 Server R2, IIS 7), the charts do not show up.

用Firebug,我可以看到呼叫ChartImg.axd返回404,而我得到的是IE浏览器中的一个空白图像持有人,或在Firefox中一无所获。我搜索了约3或4小时,到目前为止,已经尝试刚才的一切建议,但似乎没有奏效。

Using Firebug, I can see that the call to ChartImg.axd returns a 404, and all I get is a blank image holder in IE, or nothing in Firefox. I've searched for about 3 or 4 hours so far, and have tried just about everything recommended, but nothing seems to be working.

我想使用的内存/ HttpImageHandler,而不是ImageLocation配置。

I would like to use memory/HttpImageHandler, instead of the ImageLocation configuration.

我的web.config

My Web.Config

    <appSettings>
    <!--<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />-->
    <add key="ChartImageHandler" value="storage=memory;timeout=20;deleteAfterServicing=false" />
  </appSettings>
  <system.webServer>
    <handlers>
      <remove name="ChartImageHandler" />
      <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
        path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </handlers>
  </system.webServer>
  <system.web>
    <httpHandlers>
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        validate="false" />
    </httpHandlers>
    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
          assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </controls>
    </pages>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </assemblies>
    </compilation>
    <customErrors mode="Off"/>
  </system.web>

有没有人有我要去哪里错了把这个从我的服务器上工作的任何想法?

Does anyone have any ideas where I'm going wrong to keep this from working on my server?

推荐答案

我找到了答案,我的问题,但我相信,我的问题是如何从我的code运行专门朵朵。

I found the answer to my problem, but I believe that my problem stemmed specifically from how my code runs.

在我设置 privateImages = FALSE 下的appSettings我ChartImageHandler,我的图片想出了没问题,使用ImageLocation与文件存储或HttpHandler的记忆存储。

Once I set privateImages=false under appSettings for my ChartImageHandler, my images came up with no problem, using ImageLocation with file storage or HttpHandler with memory storage.

我看了看上市<一个href=\"http://blogs.msdn.com/b/deliant/archive/2008/12/02/managing-chart-generated-images-with-chart-image-handler.aspx\"相对=nofollow>这里,并意识到,我的code具有以下的NONE:

I looked at the listing here and realized that my code has NONE of the following:


  • 验证

  • 的SessionID

  • AnonymousID

所以 privateImages =真隐默认设置是让我从我的下载图像。当我设置 privateImages = FALSE 我没有问题和图表工作正常。我把我的应用程序使用Windows身份验证,并设置 privateImages = TRUE 和现在正在使用的任一图像位置设置或设置HttpHandler的产生我的图表。

so the implicit default setting of privateImages=true was keeping me from downloading my images. When I set privateImages=false I had no problems and the charts worked correctly. I set my application to use Windows Authentication, and set privateImages=true and my charts are now being generated with either the Image Location setting or the HttpHandler setting.

希望这是很有帮助的。我知道,我花了很长的时间挖四周,毫无进展。

Hopefully this is helpful. I know I spent a long time digging around and got nowhere.

这篇关于ASP.NET图表控件不工作生产服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆