Hi there;
My question revolves around connecting to an UNC path and reading a file there. I'm using VS C# 2005 Express and c#.
Importantly, I need to be able to programmatically specify the username and password for this connection; the logged-on user most likely will not have the requisite permissions.
p-code:
string strUser = bob; string strPass = bobspassword; Streamreader readme = new StreamReader(
strUser, strPass); while ((line = readme.ReadLine()) != null) { process lines; } readme.Close();
The highlighted bits are where I'm confused. How do I specify the credentials to go get the file I'm used to specifying credentials for WMI via ConnectionOptions properties such as Username, Password, Domain. Is there any equivalent for filestream operations
.NET Development22
|