ASP.NET Charting Control no longer working with .NET 4

后端 未结 3 1800
暗喜
暗喜 2021-01-12 20:19

I\'ve just upgraded to .NET 4 and my ASP.NET Chart Control no longer displays.

For .NET 3.5, the HTML produced by the control used to look like this:



        
3条回答
  •  执笔经年
    2021-01-12 21:04

    While @Michael's solution is informative on why this problem exists, there is a simpler solution. When registering the routes in your controllers handle in global.asax.cs, you could add an ignored route with a contstraint, as follows:

    protected void Application_Start() {
        ...
        RouteTable.Routes.Ignore("{*pathInfo}", new { pathInfo = @"^.*(ChartImg.axd)$" });
        ...
    }
    

提交回复
热议问题