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);
Access a drive directory and pass username and password
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

CrishRank #1,487 · 1.1K reputationPosted May 20, 2010, 1:02 AM EDT
This file directory may be readonly.Right click on this folder and remove readonly. Also give everyone and aspnet rights to this directory. Your problem may solved
joe bob4 reputationPosted May 20, 2010, 6:28 AM EDT
Thank you for your response but the directory isn't on our network.