How can I download file from a website need authentication

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

Hello everyone, WebClient object works very well with the
no-need-to-authentication website. Can it also work also with authentication
website? Thanks in advance. Sam
 
WebClient.Credentials property accepts an ICredentials. You can grab creds
out of the CredentialsCache or you can simply create a user/pass or
user/pass/domain combo and use the NetworkCredentials class. That way you
can prompt users for their authentication information.
 
Back
Top