FileExists on a Different Server

J

Joe

I am trying to find out if a file exists on a network share, but it
keeps coming up false.

The files I am attempting to see are on the following link,

\\swvtc08\EmpPhotos\

But when I try using that UNC in FileExists, it returns false.

To test a little more, I tried the FileExists command on a file on the
local webserver, but the only way it worked was if I explicitly set
the full path of the file, ie c:\inetpub\..., it returned false when I
tried, "\\swvtc06\swvtc\file.jpg" or "http://swvtc06/swvtc/file.jpg".

I have set the remote directory up as a virtual directory, so I can
get to that by http://swvtc06/EmpPhotos, but that didn't help either.
What am I doing wrong here? I am not getting any error messages, it
just returns false for everything but the explicit path.

Thanks,
Drew
 
B

Bob Barrows

Joe said:
I am trying to find out if a file exists on a network share, but it
keeps coming up false.

The files I am attempting to see are on the following link,

\\swvtc08\EmpPhotos\

But when I try using that UNC in FileExists, it returns false.

To test a little more, I tried the FileExists command on a file on the
local webserver, but the only way it worked was if I explicitly set
the full path of the file, ie c:\inetpub\..., it returned false when I
tried, "\\swvtc06\swvtc\file.jpg" or "http://swvtc06/swvtc/file.jpg".

I have set the remote directory up as a virtual directory, so I can
get to that by http://swvtc06/EmpPhotos, but that didn't help either.
What am I doing wrong here? I am not getting any error messages, it
just returns false for everything but the explicit path.

It's most likely a permissions problem. Read this:
http://www.aspfaq.com/show.asp?id=2168
 
J

Joe

It's most likely a permissions problem. Read this:http://www.aspfaq.com/show.asp?id=2168

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Thanks Bob, I had already seen Aaron's FAQ on that, and followed it to
setup the virtual directory. Since this is a intranet, we have
integrated auth setup. I have read/write/execute permission to the
share, \\swvtc08\EmpPhotos. When I setup the virtual directory, I can
put a test htm file in the remote directory and it will come up in the
browser with no issue.

I am not getting any errors, like are specified on this page,
http://support.microsoft.com/default.aspx/kb/197964.

Thanks,
Drew
 

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,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top