title: What is the correct folder in which to store application runtime data on Windows?
body: <p>If I have an application that needs to store some data at runtime to the filesystem (say, something like a SQLite database or cache files), what is the <em>correct</em> folder to store it in?</p>
  
  <p>On *nix it would be under <code>/var</code>, which is straightforward, but on Windows I can't seem to find a proper recommendation.</p>
  
  <p>Obviously it's not <code>Program Files</code> because applications don't have write-access to there at runtime. It's also obviously not in any system folder such as <code>Windows</code>.</p>
  
  <p>If it's an application that a user runs then <code>%APPDATA%</code> seems like the correct place, but what if the application is something like a service that runs as <code>Network Service</code> (e.g. an ASP.Net application running under IIS that generates files)?</p>