I have a C# Web application I'm working on that loads a csv file on
application start. The csv is an inventory file which is used to
create a collection in the Application object. If the collection is
empty, the page will try to reload the csv file on each page view.
If the file exists as named when the application starts, everything
works well. If the file does not exist when the appliction starts, and
is added later, File.Exists won't recognise that the file is there,
and returns false.
My CSV loading method is being called correctly on each page load, but
it exits as soon as File.Exists returns false, even though that file
exists.
Does anyone have any ideas on what causes this? It is as if the File
object caches which files exist on the webserver on application start,
and then never reads the disk again.