title: Getting the file path from HttpPostedFileBase
body: <p>I'm working with ASP.NET MVC 4 and I'm trying to get the path of an uploaded file in order to open and manipulate it. This is how I proceed : </p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public ActionResult Bulk(HttpPostedFileBase file)
  {
      FileStream fs = System.IO.File.Open(Server.MapPath(file.FileName), 
                                           FileMode.Open, FileAccess.Read);
  
      return RedirectToAction("Index");
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>@{
      ViewBag.Title = "Index";
  }
  
  &lt;h2&gt;Index&lt;/h2&gt;
  
      @using (Html.BeginForm("Bulk", "Bulk", null, FormMethod.Post, new 
                                            { enctype = "multipart/form-data" }))
      {
          @Html.ValidationSummary(true)
  
          &lt;fieldset&gt;
              &lt;p&gt;
                  &lt;input type="file" name="file"/&gt;
              &lt;/p&gt;
              &lt;div class="form-actions"&gt;
                &lt;button type="submit" class="btn btn-primary"&gt;Create&lt;/button&gt;
              &lt;/div&gt;
          &lt;/fieldset&gt;
      }
  </code></pre>
  
  <p>When I'm doing that, I get an error which says ... <code>Could not find a part of the path ...</code></p>
  
  <p>How can I get the path where my file is actually located?</p>