directory.exist() fails on shared folders

G

Guest

Through an ASP.Net page I want to browse a shared folder. So i used
directory.exist(\\machinename\sharename) but it returns false even if the
directory exist. please help me
 
A

Alex Homer

I seem to remember reading that this is by design - I found the same thing.
It only returns true for a local physical folder. Supposedly a shared folder
might only exist temporarily, because the target machine might disconnect or
shut down.
 
G

Guest

No Alex Homer,

I have a shared folder. Server is always on. But still it returns false. I
heard that some impersonation work will solve the problem. But i donno how to
implement this.
 
A

Alex Homer

I wasn't suggesting that *your* shared folder might not exist. I was just
repeating what I read about this issue some time ago. My experiences testing
this method returned the same result as you are getting.
 
G

Guest

been there done that Alex, no worries
in the past, i was playin with FileIO and i had a problem writing to a
shared foder, i need to go back to my code and see if it had some thing to do
with this; that's if i still have that code ;-)
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top