title: Download a file which requires authentication using vb.net/c#?
body: <p>Similar to the CSV file which can be downloaded from <code>http://download.finance.yahoo.com/d/quotes.csv?s=RHT</code> . How can I downloada file which requires authentication?</p>
  
  <p>I can simply use </p>
  
  <p><code>My.Computer.Network.DownloadFile("http://download.finance.yahoo.com/d/quotes.csv?s=RHT,MSFT,NOVL&amp;f=sl1c1d1&amp;e=.csv", "h:\s.csv")</code></p>
  
  <p>To download the file which is available in public. I tried setting the username and password as per the <a href="http://msdn.microsoft.com/en-us/library/ack30t8y%28VS.80%29.aspx" rel="nofollow noreferrer">MSDN documentation</a> but all I get is the HTML content of the login page. </p>