2
Answers

Access a drive directory and pass username and password

joe bob

joe bob

14y
2.2k
1
Im still kind of new to C#, I have to write an application that accesses a directory and get a file that requires a username and password.
I get an error "Access to path is denied". I don't know how to pass the login information to get access. I have the username and password.
Please help. Thank you


string physicalPath = System.IO.Path.GetFullPath("\\\\10.0.0.1\\DirName");
           StreamReader reader = new StreamReader(physicalPath);

Answers (2)