Telerik Chart and SharePoint 2010 and getting red X image

2 posts, 0 answers
  1. Maui
    Maui avatar
    1 posts
    Member since:
    Oct 2011

    Posted 01 Nov 2011 Link to this post

    Hi,

    I have read your threads and have followed the direction in regards to getting the Telerik Chart to render in a SharePoint 2010 Web Part.  Quick question, if there is no data in the Chart it should display right?

    Here is what I have done so far.

    1. Added the chart to a SharePoint visual web part
    2. Added the following safe controls to the web.config.
              <SafeControl Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" SafeAgainstScript="False" />
              <SafeControl Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Charting" TypeName="*" Safe="True" SafeAgainstScript="False" />
    3. Added the following httphandler to the <system.web><httpHandlers>
              <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
    4. Set the UseSession to false as well as set the TempImagesFolder

            <telerik:RadChart ID="RadChart1" runat="server"

     

     

     

            TempImagesFolder="~/_Layouts/TelericChartsTemp" UseSession="False"

     

     

     

            DataSourceID="XmlDataSource1">

    5. Gave write permission to the application pool account to the /_Layouts/TelericChartsTemp folder
    6. Deployed the solution but see the web part with a red X
    7. I have also validated that the images are being copied to the /_Layouts/TelericChartsTemp folder

    I am obviously missing something that is simple.  Please help.

    Regards,

    Maui

     

     

     

     

  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 04 Nov 2011 Link to this post

    Hello Maui,

    Here are the general directions that are necessary for successful usage of RadChart for ASP.NET AJAX under Sharepoint:
    These two entries must be present in the SafeControl list:
    <SafeControl Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" SafeAgainstScript="False" />
    <SafeControl Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Charting" TypeName="*" Safe="True" SafeAgainstScript="False" />

    Register the Chart http handler in the respective section of the web.config:
    IIS6 and above (integrated mode)
    <system.webserver>
        ...
        <handlers>
          
            ...
          
            <add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
        </handlers>
        <validation validateIntegratedModeConfiguration="false"/>
    </system.webserver>

    IIS5.x or IIS 6 and above (classic mode)
    <httphandlers>
        <remove verb="*" path="*.asmx" />
        ...
      
        <add verb="*"path="ChartImage.axd"type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
    </httphandlers>

    These two register directives must be present on the page that will be displaying the chart control:
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>


    Based on the provided information the most probable reason for the error in your scenario would be incorrect http handler registration -- probably you are using II6+ in "integrated" mode and you will need to add the handler declaration under the system.webserver section as described above.

    Hope this helps.


    Best wishes,
    Giuseppe
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

Back to Top