This is a migrated thread and some comments may be shown as answers.

Telerik Chart and SharePoint 2010 and getting red X image

1 Answer 54 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Maui
Top achievements
Rank 1
Maui asked on 02 Nov 2011, 01:28 AM
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

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 04 Nov 2011, 12:06 PM
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
Tags
Sharepoint Integration
Asked by
Maui
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or