没有为请求类型“GET”找到 HTTP 处理程序。

来源:互联网 发布:mac系统版本更新 编辑:程序博客网 时间:2024/05/14 02:39

在使用mschart的页面提示错误信息如下:

没有为请求类型“GET”找到 HTTP 处理程序。大部分原因是handlers配置节缺少对应的handler处理程序

 

This is what you need for ASP.NET 4.0 / IIS 7.5 on Windows 7:

Your web.config must contain the following:

<appSettings>  <add key="ChartImageHandler" value="storage=file;timeout=20;" /></appSettings><compilation targetFramework="4.0"> <assemblies>  <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies></compilation><system.webServer><handlers>      <add name="ChartImg" verb="*" 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>

You also need this at the top of your aspx page:

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
原创粉丝点击