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.
source share