title: FileStream not letting me create file on local machine?
body: <p>I'm using a FileStream to download information of an FTP server to a directory on my C:\ drive. For some reason, even though I've even tried setting the directory permissions to even 'Everyone' access, it's given me this exception:</p>
  
  <blockquote>
    <p>System.UnauthorizedAccessException: Access to the path 'C:\tmpfolder' is denied'</p>
  </blockquote>
  
  <p>Why is this? Here is an extract of my code.</p>
  
  <pre><code>byte[] fileData = request.DownloadData(dataMap.GetString("ftpPath") + "/" + content);
  file = new FileStream(@"C:\tmpfolder", FileMode.Create, FileAccess.Write);
  downloadedlocation = file.ToString();
  file.Write(fileData, 0, fileData.Length);
  </code></pre>
  
  <p>Also, my program is not in ASP.NET and is just a C# console app.</p>