VB.NET 2008 Express. I'm looking for a way to populate a ComboBox with a password protected list of network shares. The folders are all on a N.A.S. Right now the program simply uses the provided username and password to open either (if the personal share option is selected) the user's personal share, or (if the group share is selected) the selected group share by mapping the x drive to it. The group share is selected from a combobox that is statically populated. This list needs to rather be populated with the above mentioned shares on the NAS.
I tried this:
Dim sDir As String = "\\172.30.30.30\"
Dim dDir As New DirectoryInfo(sDir)
For Each folder As DirectoryInfo In dDir.GetDirectories
It gives the error: The UNC path should be of the form \\server\share.
The shares are in the root of the NAS so i can't provide a share name... just for testing I followed the IP with a share name to see what would happen and it just froze. I'm assuming it's because i didn't provide a user or password. I need to populate the combobox with the share names in the password protected root.