title: Load file from disk in C# - System.IO.IOException
body: <p>I'm getting to load my file from disk but I'm getting an error: System.IO.IOException.</p>
  
  <pre><code>FileStream attachment;
  using (var stream = File.Open(@"c:\testFolder\test.txt", FileMode.Open))
  {
   attachment = stream;
  }
  </code></pre>
  
  <p>Error from logs:</p>
  
  <blockquote>
    <p>Exception thrown: 'System.IO.IOException' in System.IO.FileSystem.dll
    Exception thrown: 'System.IO.IOException' in
    System.Private.CoreLib.ni.dll 2017-04-20 07:19:08 [Error] Invalid
    argument</p>
  </blockquote>
  
  <p>The file exists. </p>
  
  <p>What I'm doing wrong?</p>
  
  <p>I'm using Asp.Net Core 1.1.</p>