ASP.NET Charts – Storage Mode

Microsoft has released charts for ASP.NET few weeks back at the PDC. ScottGu has blogged about it here. I have been using charts in the past from a third party vendor and have converted them all to ASP.NET charts because of the variety & extensibility they provide and it will be part of .NET Framework 4.0 moving forward even though it’s a separate installation now . It was acquired from Dundas Charts by Microsoft.

One thing I could not find in the documentation is a way change the location where chart is stored. By default it’s stored in hard disk and the location is specified in the web.config file as below

  1. <appSettings>  
  2.     <add key=“ChartImageHandler” value=“storage=file;timeout=20;dir=c:\TempImageFiles\;”/>  
  3. </appSettings>  

 Many times, the chart image generated might differ from user to user. In those kind of scenarious it’s better to store the chart image in the memory.

  1. <appSettings>  
  2.     <add key=“ChartImageHandler” value=“storage=memory;timeout=20;dir=c:\TempImageFiles\;”/>
  3. </appSettings>  

And lastly the chart image could even be stored in session if required,

  1. <appSettings>  
  2.     <add key=“ChartImageHandler” value=“storage=session;timeout=20;dir=c:\TempImageFiles\;”/>
  3. </appSettings>  

But make sure you use “out of proc” mode for session for this to work.



SwaroopJune 24th, 2009 at 11:38 pm

Thanks !

Useful post.

JanOctober 6th, 2010 at 3:07 pm

THANKS A LOT ! It helped me. I spent entire afternoon with this.


prabhakarFebruary 11th, 2012 at 12:57 pm

Thanks . . it’s good solution for me . . .

Leave a comment

Your comment

Spam Protection by WP-SpamFree