I am trying to download a file from a microsoft site, that uses form based logins (microsoft account). How can I do that using WebClient ? The link is something like "http://go.microsoft.com/fwlink/ ....." Thanks
Asked
Active
Viewed 355 times
1 Answers
1
You can set credentials to the WebRequest as follows. This post explains how to download the file.
// Create a request for the specified remote file name
WebRequest request = WebRequest.Create(remoteFilename);
if (request != null)
{
string username = "username";
string password = "password";
request.Credentials = new System.Net.NetworkCredential(username, password);
}
-
Hi , thanks for helping me, but the file keeps with the message : – Laerte Junior Sep 29 '13 at 11:07