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.

Curtis
  • 101,612
  • 66
  • 270
  • 352

5 Answers5

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

MMC
  • 99
  • 15
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" />  
Brian Garson
  • 1,160
  • 6
  • 11
  • 1
    Cheers Brian, but I already have the following in ``: ``. So I don't think this is the cause of the issue. Can you think of any other reasons? Cheers! – Curtis Feb 29 '12 at 10:02
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.

Brissles
  • 3,833
  • 23
  • 31
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.

Adrian Carr
  • 3,061
  • 1
  • 34
  • 38
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">