I found out an unexpected behavior during using MS Chart Control within a SharePoint Visual Web Part.where I got 403 forbidden error at the first time I tried to browse the page.
But when I tried to refresh the page again, the error disappeared !
This problem might occur because of the ChartImageHandler key was not configured properly with a correct “URL” attribute in web.config file.
- Open the “web.config” file of SharePoint web application that located in inetpub\wwwroot\wss\.
- Press Ctrl + F to look for “ChartImageHandler”
- Make sure that the URL value was assigned to the appropraute URL folder properly.
<appSettings> <add key="ChartImageHandler"value="storage=memory;timeout=20; URL=/_layouts/Images/MicrosoftChartControls/" /> </appSettings>
- Save the file.