Hey guys, kinda new to C#. I have searched the forums a bit and havent found my answer.
My question is.....I would like to download a file from an https site and save it to a network location. I am prompted for credentials when logging in.
Any thoughts?
Thanks
I have tried it this way.
private void button1_Click(object sender, EventArgs e)
{
string username = "MyUsername";
string password = "MyPassword";
string domain = "MyDomain";
string MyFile = @"c:\File.xsn";
string MyURL = "https://qaTestSite/XSN/File.xsn";
System.Net.WebClient Client = new WebClient();
Client.Credentials = new NetworkCredential(username, password, domain);
Client.DownloadFile(MyURL,MyFile);
MessageBox.Show("File Downloaded!");
}


Reply With Quote