HTTP 403 Forbidden error with MS Chart Control in SharePoint

MS Chart Control – HTTP 403 Forbidden error

I found out an unexpected behavior during using MS Chart Control within a SharePoint Visual Web Part. where I got a 403 forbidden error at the first time I tried to browse the page.

HTTP 403 Forbidden error with MS Chart Control in SharePoint

But when I tried to refresh the page again, the error disappeared!

Cause

This problem might occur because the ChartImageHandler key was not configured properly with a correct “URL” attribute on web.config file.

Solution

  • Take a backup from the “web.config” file of SharePoint web application that located in inetpub\wwwroot\wss\.
  • Open the “web.config” file.
  • Press Ctrl + F to look for “ChartImageHandler”
  • Make sure that the URL value was assigned to the correct URL folder properly.
<appSettings>
<add key="ChartImageHandler"value="storage=memory;timeout=20;
 URL=/_layouts/Images/MicrosoftChartControls/" />
</appSettings>
  • Save the file.

You might also like to read

Leave a Reply