"Error loading RadChart Image" on IIS7
Asked Answered
R

5

6

I'm using a Telerik RadChart control on my ASP.NET web application.

This works fine when running on localhost, but now the application has been deployed to IIS7 and the following error appears:

enter image description here

Why is this? And how can I resolve the issue?

I've seen on some forum posts that the solution is to add the following into <system.webServer> in the web.config:

<add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>

However, I have already done this, and the error is still appearing.

Retard answered 23/2, 2012 at 11:22 Comment(0)
H
3

I had the same problem, for IIS7 the Telerik HTTP Handlers that you have in <system.web> <httphandlers> need to be in <system.webServer><handlers>

I'm not sure if you should remove from system.web but just copy over your telerik http handler for rad chart, should look something like this:

<add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2011.3.1305.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />  
Hegarty answered 23/2, 2012 at 13:54 Comment(1)
Cheers Brian, but I already have the following in <system.webServer>: <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>. So I don't think this is the cause of the issue. Can you think of any other reasons? Cheers!Retard
S
4

in web.config file... add the following:-

 <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true"/>
    <handlers>
      <add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
      <add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
      <add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
      <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode" />
      <add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI"  preCondition="integratedMode" />
    </handlers>
  </system.webServer>

that solved my issue

Somehow answered 8/10, 2012 at 15:9 Comment(0)
H
3

I had the same problem, for IIS7 the Telerik HTTP Handlers that you have in <system.web> <httphandlers> need to be in <system.webServer><handlers>

I'm not sure if you should remove from system.web but just copy over your telerik http handler for rad chart, should look something like this:

<add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2011.3.1305.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />  
Hegarty answered 23/2, 2012 at 13:54 Comment(1)
Cheers Brian, but I already have the following in <system.webServer>: <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>. So I don't think this is the cause of the issue. Can you think of any other reasons? Cheers!Retard
S
0

I don't know exactly what they're doing with the RadChart and the ChartHttpHandler, but I solved my issue by changing the requireSSL attribute of the system.web > httpCookies section to false:

 <system.web>
    <httpCookies httpOnlyCookies="true" requireSSL="false" lockItem="true" />
 </system.web>

We'd recently just migrated our application (which used SSL and worked fine with RadControls) to a new server and were running with no SSL certificate temporarily.

I'd followed all previous instructions to solve this issue including setting all RadChart EnableHandlerDetection properties to false while using handlers placed only in the system.webServer > handlers section and removing any in the system.web > httpHandlers section, with no luck. I was either getting the error posted by the OP or the message telling you to add a handler in the (old) system.web > httpHandlers section -- no permutation of these settings helped.

Stucker answered 21/4, 2015 at 16:13 Comment(0)
R
0

I had this same issue despite already having the entries in <system.web> <httphandlers> (for IIS6) and <system.webServer><handlers> (for IIS7). The difference for me was a project that is a mix of ASP.NET WebForms and MVC. The fix was adding this line in Global.asax. Now any charts in aspx pages under Reports/ folder works.

routes.IgnoreRoute("Reports/ChartImage.axd/{*pathInfo}"); 

Hope this helps.

Rayner answered 1/7, 2015 at 19:37 Comment(0)
D
0

I had the same problem, for IIS7 the Telerik HTTP Handlers that you have in

I solved the issue by adding ChartHttpHandler

<handlers>
      <add name="ChartHandler" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler" />
</handlers>
 <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />

and also i added

<rad:RadChart UseSession="false">
Dredge answered 21/7, 2016 at 12:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.