PC Review


Reply
Thread Tools Rate Thread

ASP.NET: File.Exists not returning correct value after file is renamed

 
 
Epson Barnett
Guest
Posts: n/a
 
      16th Dec 2003
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading file associated icons from a secondary thread not returning correct icon - IconTest.zip (0/1) nagar@community.nospam Microsoft Dot NET Framework Forms 7 9th Jul 2007 11:17 AM
system.IO.File.Exists doesn't working for file that is outside my virtual directory Max Microsoft Dot NET 5 13th Aug 2006 03:59 AM
system.IO.File.Exists doesn't working for file that is outside my virtual directory Max Microsoft ADO .NET 0 10th Aug 2006 03:57 PM
Error message 1311 Source file not found Verify file exists =?Utf-8?B?bW9sbHk=?= Microsoft Outlook Contacts 0 17th Oct 2005 04:31 PM
.xls file gets renamed to a file with no extension Everett Microsoft Excel Misc 2 13th Jan 2004 01:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:32 AM.