joe bob

joe bob

  • NA
  • 5
  • 0

Access a drive directory and pass username and password

May 18 2010 2:02 PM
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)