title: System.IO.FileNotFoundException : Could not find file
body: <p>I am using file upload control. But when I try to read uploaded file, it's looking for folder where project is created and giving error.
  The code for this</p>
  
  <pre><code> &lt;input type="file" name="file" /&gt;
   &lt;button type="submit"&gt;Upload File&lt;/button&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>[HttpPost]
      public IActionResult UploadFile(IFormFile file)
      {
          string FileName = file.FileName;
          if (file != null &amp;&amp; file.Length != 0)
          {
              FileStream fileStream = new FileStream(FileName, FileMode.Open);
              using (StreamReader streamReader = new StreamReader(fileStream))
              {
                  string line = streamReader.ReadLine();
              }
  
          }
      }
  </code></pre>