G
Guest
I am trying to find out is a folder exists within a share on a server. I can
successfully determine if a file exists within the share, but I can't figure
out how to determine if it's parent folder exists.
This is what I'm trying:
Dim fwrqFolder As FileWebRequest
Dim fwrFolder As FileWebResponse
Dim uriFolder As Uri
Try
Dim strPathName as String = "10.0.0.50/DemoProj/PDQ"
uriFolder = New Uri("file://" & rstrPathName)
fwrqFolder = CType(WebRequest.Create(uriFolder),
FileWebRequest)
fwrFolder = CType(fwrqFolder.GetResponse(),
FileWebResponse)
Catch err As WebException
MsgBox(("WebException: " + err.Message))
The error says: Access to the path "\10.0.0.50\DemoProj\PDQ" is denined.
However, if I add an existing filename to the path it works.
The share is defined as a Virtual Directory with Read, Write, and Directory
Browsing. Directory Security is set to allow Anonymous access.
Any suggestions?
Thanks...Steve
successfully determine if a file exists within the share, but I can't figure
out how to determine if it's parent folder exists.
This is what I'm trying:
Dim fwrqFolder As FileWebRequest
Dim fwrFolder As FileWebResponse
Dim uriFolder As Uri
Try
Dim strPathName as String = "10.0.0.50/DemoProj/PDQ"
uriFolder = New Uri("file://" & rstrPathName)
fwrqFolder = CType(WebRequest.Create(uriFolder),
FileWebRequest)
fwrFolder = CType(fwrqFolder.GetResponse(),
FileWebResponse)
Catch err As WebException
MsgBox(("WebException: " + err.Message))
The error says: Access to the path "\10.0.0.50\DemoProj\PDQ" is denined.
However, if I add an existing filename to the path it works.
The share is defined as a Virtual Directory with Read, Write, and Directory
Browsing. Directory Security is set to allow Anonymous access.
Any suggestions?
Thanks...Steve