title: WebClient.DownloadFile returns login page even when credentials are provided
body: <p>I am trying to download a file that is behind a login page. I have looked into many ways to add credentials but the response is always the log in page's html. I have tried 2 passes with client.uploadValues or client.uploadstring to get a cookie and a single pass just providing credentials.</p>
  <pre><code>Public Sub downloadImage()
      Dim username As String = &quot;xxxxx&quot;
      Dim password As String = &quot;xxxxx&quot;
          Using client As New WebClient()
              client.Credentials = New NetworkCredential(username, password)
              client.DownloadFile(&quot;https://retailerservices.domain.com/Image/ItemHighRes/26634/1&quot;, AppDomain.CurrentDomain.BaseDirectory &amp; &quot;test.jpg&quot;)
          End Using
  End Sub
  </code></pre>
  <p>Any recommendations?</p>