I'm writing a 200k JSON file from a console app to a web folder of an IIS box every 10 min. Mobile clients regularly pick up their data from this file via IIS.
Wondering what'd happen if IIS hits the file while its being written. This question says File.WriteAllText uses FileShare.Read - so someone could FEASIBLY read it while it's being written.
I'm about to test this with a v. big file and see how IIS handles a request in the middle of the write. I remember a trick in UNIX to write to a version file json.201207231033
and update the symlink to json
.
Does anyone else have experience with this?