Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: accessing remote folders using directory class


Message #1 by "mark" <mark.towse@r...> on Wed, 27 Feb 2002 11:11:26
Mark,

	Maybe it has something to do with the backslashes? Remember that
a single backslash is escaped unless you put an '@' sign in front of it?
So try Directory.FolderExists(@"\\anotherserver\reports") or
Directory.FolderExists("\\\\anotherserver\\reports");
	In order to use UNC to get to another server, do you need to
login as a specific user and domain maybe?

Minh.

-----Original Message-----
From: mark [mailto:mark.towse@r...] 
Sent: Wednesday, February 27, 2002 11:11 AM
To: ASPX_Professional
Subject: [aspx_professional] accessing remote folders using directory
class


Hi,

I am trying to check to see if shared folders exists using a web app.  I

am using 

Dim objDirectory As Directory
Dim blnExists As Boolean = objDirectory.Exists
("\\DifferentServer\Reports")

I keep getting false from this code.  

If i try using the same code to view a shred file on the machine that i
am 
working on then i get true.

I have also tried using 

Dim objFSO As New FileSystemObject()
blnExists = objFSO.FolderExists("\\anotherserver\reports")

and i also get false if the folder is on another machine and true if it
is 
on the same machine that i am working on.

If i use similar code shown to as shown above in a VB 6.0 windows app i 
can see folders that are on other machines in the network ok.  Is there 
some kind of security settings i need to make for a .NET web app to be 
able to view shared folders on other machines.  I have tried giving the 
folder i wish to view 'Everyone' access and i still cant see it.

Cheers

$subst('Email.Unsub').



_________________________________________________________

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com




  Return to Index