title: Bypass login and Download Zip file from URL
body: <p>I want to download a zip file form URL.It contains 20 to 30 CSV file and has total size between 50 KB to 100 KB. I have tried using below code but it is not working. 
  When i directly open URL from web browser it redirects to login page and after successful login download the zip file.</p>
  
  <pre><code>  using (var client = new WebClient())
    {
      client.DownloadFile("http://MyURL","Myfile.zip");
    }
  </code></pre>
  
  <p>If i provide Download URL of CSV file in above code then it download html login page. Also tried by providing credential and header information as below but it is not working.</p>
  
  <pre><code>    using (var client = new WebClient())
        {
           client.Credentials = new NetworkCredential("username", "password");
           client.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip");
           client.DownloadFile("http://MyURL","Myfile.zip");
        }    
  </code></pre>
  
  <p>I am using C# windows application.</p>