Check if the shared folder is protected in vb.net

I have a shared folder hosted on the computer as a server. When I want to access this shared folder from another computer that acts as a client, how can I check if the shared folder that I want to get is protected with a password or not.

+4
source share
1 answer

try to access it. if you could then do it. if not, then a security exception is thrown. this is the part when you need a password.

This applies to the standalone windows that I assume. Windows shares are now never password protected. The share is protected by permissions for some user accounts. folder> rt.click> property> security. dot network code is run from the account of the user who is logged in. if the user who has the code has permissions on the folder, as well as on the shared resource, then the code can access it. otherwise, a security exception occurs.

+4
source

Source: https://habr.com/ru/post/1484319/


All Articles