File.Exists

M

Meelis Lilbok

Hi

I have problme with my webservice(VB.Net 2.0)

If i use File.Exists() it always returns false.
File is 100% there, all permissions are set, but i get False

Any Ideas?


Meelis
 
T

Tim_Mac

hi meelis,
are you absolutely sure of the identity that is running your code, and that
it has read permissions on the file?

if the path is correct and the file does exist, then as an experiment you
could try to open a stream to the file using the FileMode.CreateNew, this
should throw an IOException if the file is already there.

FileStream f = new FileStream(path, FileMode.CreateNew...

this would at least serve as a double check as to the existence of the file
and adequate permissions. if you get a different exception when opening the
stream, post it here.

hope this helps
tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top