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
-
<appSettings>
-
<add key=“ChartImageHandler” value=“storage=file;timeout=20;dir=c:\TempImageFiles\;”/>
-
</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.
-
<appSettings>
-
<add key=“ChartImageHandler” value=“storage=memory;timeout=20;dir=c:\TempImageFiles\;”/>
-
</appSettings>
And lastly the chart image could even be stored in session if required,
-
<appSettings>
-
<add key=“ChartImageHandler” value=“storage=session;timeout=20;dir=c:\TempImageFiles\;”/>
-
</appSettings>
But make sure you use “out of proc” mode for session for this to work.
Ponnu
Thanks !
Useful post.
THANKS A LOT ! It helped me. I spent entire afternoon with this.
Jan