Directory.CreateDirectory() throwing DirectoryNotFound exception for //server/share path

D

Dan

Hello,

I am creating an ASP.NET web service with VB, and I need to be able to
create a directory on a network share. When I attempt to create the
directory (\\server\share\test), I receive the DirectoryNotFound
exception, stating "Could not find part of the path '\\server\share'."
I have also found that when I create the "test" folder in that
network share, and run Directory.Exists("\\server\share\test"), it
returns false.

All of the code works fine when dealing with local paths (such as
"C:\test"). I have verified that the account the web service is
running as has all the necessary permissions.

Any ideas?

Here is the actual code that throws the exception: (strFilePath =
"\\server\share\test")

If Not Directory.Exists(strFilePath) Then
Directory.CreateDirectory(strFilePath)
....

Thank you!
 
M

Max

What are the security permissions of \\server\share and of the underlying
directory on the server?
What permission does your code have?
Does it use Internet Guest Account (IUSR_<ComputerName>)?
 

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,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top