Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should temp files created by the MS Chart control go?

The default location:

<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />

is fine for development, but not so good for deploying on IIS. I found a forum post that mentioned you could drop the path altogether, which dumps the temp file(s) directly in the root of my project

<add key="ChartImageHandler" value="storage=file;timeout=20;" />

I don't want to clutter up my root folder though, so I am settling on this for now:

<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/App_Data/ChartImageTemp/;" />

Thoughts or what are other people doing? I'm a little curious as to why this is even a configurable option. I am using .net 3.5, maybe this is different in 4.0?

like image 287
Brian Vander Plaats Avatar asked Sep 10 '10 14:09

Brian Vander Plaats


1 Answers

A related question:

MSChart: ChartImageHandler pros/cons of the different storage settings

Pointed me to an article by Scott Mitchell:

https://web.archive.org/web/20201205231110/https://www.4guysfromrolla.com/articles/081909-1.aspx

I've decided to use the "memory" option, so no files or paths to configure:

   <appSettings> 
      <add key="ChartImageHandler" value="storage=memory;deleteAfterServicing=true;"/> 
   </appSettings>
like image 120
Brian Vander Plaats Avatar answered Oct 22 '22 21:10

Brian Vander Plaats