If you’re using MS Chart Control for .NET Framework 3.5 SP1 (in .NET Framework 4.0 it comes as a part of a framework), you may experience a strange behavior when chart images aren’t rendered on the page:
If you’re using HTTP Handler to serve chart images (image URL looks something like “…/ChartImg.axd?i=chart_24dae5cb1f024c4a89f4fe492f05cc59_0.png“) missing mapping in IIS configuration could be to blame
In IIS Management open properties of the virtual directory that hosts your application. Click “Configuration” button in Application Setting section. Look for “.axd” among mapped extensions. If it’s not there – you need to add it:
- In “Executable” field browse for “aspnet_isapi.dll” (usually it’s C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll).
- In “Extension” field type “.axd”
- Limit Verbs to “GET,HEAD,POST,DEBUG”
- Check “Script Engine”
Be careful though, if your AXD mapping is incorrect (e.g. verb is misspelled) it may screw client-side of ASP.NET Ajax (technically it’s not supposed to work at all with AXD mapping missing) and you may see errors like “ASP.NET AJAX client-side framework failed to load”.
If everything is set correctly you will see beautifully rendered chart
P.S. If AXD extension is mapped correctly in IIS and you still experience behavior above, check 3rd party software that is installed on your server. Systems like SiteMinder can block application mapping including AXD.
The AXD mapping is in my list, and enabled (I’m using IIS 7), and the image is still not rendered.
@Peg Futrell There’re couple of other possible causes – there could be some security hardening between server and browser (SiteMinder mentioned above can explicitly allow/prohibit mapping) or security setting of browser itself – in one case I encountered images weren’t rendering in browser on one machine, while showing perfectly on another.