title: UnauthorizedAccessException
body: <p>I am working with the tutorial here: <a href="http://www.devtoolshed.com/content/c-download-file-progress-bar" rel="nofollow">http://www.devtoolshed.com/content/c-download-file-progress-bar</a> and I am receiving an UnauthorizedAccessException on the following line of code</p>
  
  <pre><code>using (Stream streamLocal = new FileStream(sPathToWriteFilesTo, 
  FileMode.Create, FileAccess.Write, FileShare.None)) 
  { 
      //... 
  }
  </code></pre>
  
  <p>Perhaps it is something with permissions of the file I am trying to read? It is just a simple text file requested using FTP (instead of HTTP as the tutorial shows).</p>
  
  <pre><code>string sFtpToReadFilesFrom = "ftp://&lt;user&gt;:&lt;pass&gt;@mysite.tk/updates/App_Data/output_log.txt";
  string sPathToWriteFilesTo = Application.StartupPath + "\\App_Data";
  
  Uri url = new Uri(sFtpToReadFilesFrom);
  FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(url);
  request.Timeout = 10000;
  request.ReadWriteTimeout = 10000;
  request.Method = WebRequestMethods.Ftp.GetFileSize;
  FtpWebResponse response = (FtpWebResponse)request.GetResponse();
  response.Close();
  </code></pre>
  
  <p>If anyone sees any immediate red flags with the FtpWebRequest please do let me know. I am primarily concerned with the UnauthorizedAccessException and how to fix that.</p>