1

We use telerik radchart for charting in our app, we've been using it for some time and recently upgraded to 2013.2.717.40 in our app (which was the most recent version our expired subscription had).

Since then, we get a 403 error when using a chart image:

ASPX:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadChart ID="RadChart" IntelligentLabelsEnabled="True" runat="server" CssClass="RadChart" DefaultType="Spline" />

The web.config has:

<httpHandlers>
<add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
</httpHandlers>

and

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

And I get a 403 permission denied on the url for the ChartImage.axd

The image is correctly created and cached in the appropriate temporary folder we've configured for use.

In processmonitor, as soon as that file is correctly written, the 403 failed request trace log file is created (we've enabled failed request tracing)

That file contains:

ModuleName IsapiModule 
Notification 128 
HttpStatus 403 
HttpReason Forbidden 
HttpSubStatus 0 
ErrorCode 0 
ConfigExceptionInfo  
Notification EXECUTE_REQUEST_HANDLER 
ErrorCode The operation completed successfully. (0x0) 

I'm now at a loss.

I can't see anything being denied permissions and it looks like the web.config is set right for charting. If I take off the query string I get an error page as required parameters are missing, so the mapping appears to be working.

Any ideas?

THEMike
  • 1,701
  • 2
  • 17
  • 28

1 Answers1

1

The problem turns out to be that the Telerik RadChart when using image files on disk, as opposed to session storage (UseSession=False) does some checks on the path passed in for the temporary image directory, and the encrypted filename passed to ChartImage.axd to make sure you're not doing some hacking.

We were using:

/App/GeneratedImages

Which was causing the files to be written to the right place on disk, however, when the Telerik component checked this against the image path, they didn't match enough causing Telerik to throw a 403 itself.

I may or may not have determined this with the help of Reflector.

We changed to use: ~/GeneratedImages

Which made things work, I need to understand better why /App/GeneratedImages didn't map right. But for now Production is restored :)

THEMike
  • 1,701
  • 2
  • 17
  • 28