Rad Chart requires both IIS6 and IIS7 handlers in web.config

Thread is closed for posting
8 posts, 1 answers
  1. Greg Smalter
    Greg Smalter avatar
    2 posts
    Member since:
    Mar 2008

    Posted 08 Oct 2009 Link to this post

    We have a page that uses a RadChart, and it works fine so long as we have the site's web.config populated with two separate handlers as detailed in the IIS7 and IIS5/6/7 sections here.

    To summarize, it says to put this in in the system.webserver/handlers section for IIS7:
    <add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0" />

    And to put this in the system.web/httphandlers section for IIS6:
    <add verb="*"path="ChartImage.axd"type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />

    We have added these sections and the control works fine.

    The problem is that removing either of these config blocks causes the RadChart to break.  We are running in IIS7 integrated mode.  Only the handler in the system.webserver/handlers section should matter, but that is not the case.

    If we remove just the httphandler from the system.web IIS6 section, the RadChart renders with this message:

    The Chart http handler is not registered. Please, manually add the following line to your Web.config httpHandlers section:
    <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2009.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />

    If we remove just the handler from the system.webserver IIS7 section, we get a javascript pop window that says "Error loading RadChart image."

    I don't understand how it is using both handlers.  It should be using either the system.webserver IIS7 integrated mode handler or the system.web IIS6/non-integrated httphandler.  In our case, since we are running IIS7 integrated, we should only have to specify the one handler.

    Furthermore, we are using the Rad HTML editor control which requires the DialogHandler and the SpellCheckHandler, and it works totally fine when we specify the handlers in only the system.webserver IIS7 section.  What is different about RadChart?

    Thank you.


  2. Answer
    Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 12 Oct 2009 Link to this post

    Hi Greg,

    Please set the RadChart.EnableHandlerDetection property to false and you will be able to use the control with IIS7 handler declaration only. We will forward your feedback to our developers so they can enhance the http handler detection logic in future versions of the control.


    Greetings,
    Manuel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul
    Paul avatar
    42 posts
    Member since:
    Aug 2005

    Posted 19 Nov 2009 Link to this post

    HI there

    I am having exactly the same problem except that I am using 'Classic' mode which I need for developing a DNN module. I have disabled/enabled the EnableHandlerDetection property with no change to the output.

    I get a Java Script error and then the message 'Error Loading RadChart image. You may also wish to check the ASP.NET Trace for further details. Display stack trace?' with an OK or Cancel button.

    If I click OK it just does it again and if I click Cancel the page completes but the chart is not shown.

    I am using Windows 7 with VS2008 and all updates applied.

    Any help please?

    Regards
    Paul
  5. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 24 Nov 2009 Link to this post

    Hello Paul,

    Can you paste your web.config settings so we can track down the issue here? The problem certainly seems related to incorrect configuration of the ChartHttpHandler in the web.config (as you say you are using "Classic" mode that means your ChartHttpHandler should be declared in the system.web/httphandlers section):

    <system.web> 
     
        ... 
     
        <httpHandlers> 
          <remove path="*.asmx" verb="*" /> 
          <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" /> 
          <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" /> 
          <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" /> 
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> 
          <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" /> 
        </httpHandlers> 
         
        ... 
     
    </system.web> 

    Btw -- does adding the system.webserver/handlers section for IIS7 make any difference (it supports IIS7 integrated mode but just in case):
      <system.webServer> 
        <validation validateIntegratedModeConfiguration="false" /> 
        <modules> 
          <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
        </modules> 
        <handlers> 
          <remove name="WebServiceHandlerFactory-Integrated" /> 
          <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
          <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
          <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
          <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" /> 
          <add name="ChartImage_axd" verb="*" preCondition="integratedMode" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" /> 
        </handlers> 
      </system.webServer> 


    Greetings,
    Bart.


  6. Paul
    Paul avatar
    42 posts
    Member since:
    Aug 2005

    Posted 25 Nov 2009 Link to this post

    Hello Bart

    Thank you for your reply, it's much appreciated. In the end I sorted it myself, it was a web.config problem. Apologies for troubling you.

    Regards

    Paul
  7. Winston Yong
    Winston Yong avatar
    13 posts
    Member since:
    Aug 2009

    Posted 04 Jan 2011 Link to this post

    Hello Paul!

    i am haing same problem can you please tell me what solution u implemented?
    your help would be greatly appreciated.
    Thanks
    Ali
  8. Eirik H
    Eirik H avatar
    36 posts
    Member since:
    Mar 2010

    Posted 19 Aug 2014 in reply to Winston Yong Link to this post

    Telerik, can't you change this behaviour? It's completely ridiculous that it's mandatory to include stuff for software that is over 10 years old.
  9. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3599 posts

    Posted 21 Aug 2014 Link to this post

    Hello Eirik,

    I am attaching here a really simple example that runs fine on my end in both Classic and Integrated mode. This is so because it uses a standard web.config with all our HTTP handlers added to it, and they have not changed recently.

    Some of our controls require special resources and thus, they need the appropriate handler in the web.config. This cannot be avoided, but once you copy over about a dozen lines, you should not need to change them again.

    I hope this explains the case.


    Sincerely yours,

    Marin Bratanov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017