6

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?

Kit Roed
  • 5,167
  • 5
  • 30
  • 34
Brian Vander Plaats
  • 2,257
  • 24
  • 28

1 Answers1

12

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>
Community
  • 1
  • 1
Brian Vander Plaats
  • 2,257
  • 24
  • 28
  • If you use web gardens, you're supposed to use file storage, but the control is buggy and doesn't really support web gardens regardless. – Greg Nov 24 '10 at 14:34
  • Good to know, but we have one production web server and one production db server here :) – Brian Vander Plaats Nov 24 '10 at 14:41
  • 1
    Web Gardens is kind of a "web farm on a single server". You just open up the IIS admin and select the # of processes you want to run. – Greg Nov 24 '10 at 14:43
  • 1
    Isn't there a problem using memory option if you choose to print the charts? I believe that some versions of IE won't print them. – chris Nov 24 '10 at 15:20
  • Prints OK on IE8. With IE6, might have to set deleteAfterServicing to false http://social.msdn.microsoft.com/Forums/en/MSWinWebChart/thread/c3d9972c-0e88-4177-ae0b-7a2ebe6afe15 – Brian Vander Plaats Nov 24 '10 at 17:57