asp图表错误 [英] asp chart errors

查看:260
本文介绍了asp图表错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的情况使用asp ajax图表控件。我有一个应用程序试图在aspx页面上显示图表。这里是我的web.config的几个片段 -

 < appSettings> 
< add key =ChartImageHandlervalue =storage = file; timeout = 20; dir = c:\temp\;/>
< / appSettings>

...

 < httpHandlers> 
< add path =ChartImg.axdverb =GET,HEADtype =System.Web.UI.DataVisualization.Charting.ChartHttpHandler,System.Web.DataVisualization,Version = 3.5.0.0,Culture =中性,PublicKeyToken = 31bf3856ad364e35validate =false/>
< / httpHandlers>

...

 < handlers> 
< remove name =ChartImageHandler/>
< add name =ChartImageHandlerpreCondition =integratedModeverb =GET,HEADpath =ChartImg.axdtype =System.Web.UI.DataVisualization.Charting.ChartHttpHandler,System.Web。 DataVisualization,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35/>
< / handlers>

当我通过VS2010 IDE运行应用程序时,我得到以下错误尝试显示图表 -

 解析器错误
说明:解析服务此请求所需的资源时发生错误。请查看以下特定解析错误详细信息,并相应地修改源文件。

解析器错误消息:未知的服务器标签'asp:Chart'。

但是,如果我将它部署到我的服务器,似乎无法找到图表其中图像将与红色X一起出现,表示图像不能被找到)。
区别是我从windows xp 32位计算机运行IDE,我部署的服务器是运行IIS 7的64位Server 2008计算机。



有人知道我为什么会有这些问题吗? / code>部分添加以下内容:

 < add tagPrefix =asp
namespace = System.Web.DataVisualization,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35/>

或者您可以在使用它们的页面上注册控件。


I have a strange situation using asp ajax chart controls. I have an application which is attempting to display a chart on an aspx page. Here are a couple of snippets from my web.config -

<appSettings>
    <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\temp\;"/>
</appSettings>

...

<httpHandlers>
    <add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>

...

<handlers>
    <remove name="ChartImageHandler"/>
    <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>

When I run the application through the VS2010 IDE, I am getting the following error when trying to display the chart -

Parser Error 
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Unknown server tag 'asp:Chart'.

However, if I deploy it to my server, it seems that the chart cannot be found (an outline where the image would be appears with the red X saying that the image cannot be found). The difference is that I am running the IDE from windows xp 32bit machine, and the server I deploy to is a 64bit Server 2008 machine running IIS 7.

Does anyone have any idea why I might be having these problems? Thanks for any thoughts.

解决方案

In the web.config <controls> section add the following:

<add tagPrefix="asp"
         namespace="System.Web.UI.DataVisualization.Charting"
         assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>      

Or you can register the controls on the page you are using them.

这篇关于asp图表错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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