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 HTTP 403 Forbidden error with MS Chart Control in SharePoint](https://i0.wp.com/spgeeks.devoworx.com/wp-content/uploads/2015/10/403-forbidden.jpg?resize=750%2C260&ssl=1)
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.