I am trying to upload allow file uploads in my MVC app but when I test it out the page simply refresh, does not show any errors, and does not upload the file so I am at a complete loos as to what is wrong.

View:

```
<form action="" method="post" enctype="multipart/form-data">

    <label for="file">Filenname:</label>
    <input type="file" name="file" id="file" />
    <input type="submit" />
</form>

```

Controller:

```
    [HttpPost]
    public ActionResult Index(HttpPostedFileBase file)
    {
        if (file.ContentLength > 0)
        {
            var filename = Path.GetFileName(file.FileName);
            var path = Path.Combine(Server.MapPath("~/"), filename);
            file.SaveAs(path);
        }

        return RedirectToAction("Index");
    }

```