get dir list from remote pc (exe appl)

CesarX

New member
Joined
Dec 14, 2011
Messages
1
Programming Experience
1-3
Masters:

excuse my english... i hope you understand my problem:

on .Net 2003... visual basic proyect - exe application, i use this code (example) to get the dir list

Private Sub Btn_list_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim filenames() As directory.GetFiles(“C:\test\”)
listox1.datasource = filenames
End Sub


the issue is... local works so fine... but, change "C:\test\” to
“\\dev2\testmar\” o “\\192.168.13.82\testmar\” doesnt works…. neither when mapping that path... the dir have all permissions

how can i need to do to get those files?... authentification?

thanks in advance
 
doesnt works
How so? Is an exception thrown?
“\\dev2\testmar\” o “\\192.168.13.82\testmar\” doesnt
UNC paths are not a problem by themselves, although documentation mention "unmapped drive" may throw DirectoryNotFoundException I haven't experienced that.
neither when mapping that path
Meaning you mapped the UNC to for example drive K: and tried listing drive K: instead?
Also, was different user credentials necessary when you mapped the drive? I take it your mapping worked fine in Windows Explorer. UnauthorizedAccessException is thrown if you attempt accessing UNC where your currect user is not authorized for access.
 
Back
Top