I get this error

```
The process cannot access the file '..\Images\Temp\6574_1212665562989_1419270107_30610848_6661938_n.jpg' because it is being used by another process.

```

When I tried this:

```
try
{
    var file = Request.Files["FileProfilePicture"];
    file.SaveAs(Server.MapPath("~/Images/Temp/" + file.FileName));
    Bitmap imageOrj = new Bitmap(System.Web.HttpContext.Current.Server.MapPath("~/Images/Temp/" + file.FileName));
    Image imageBig = ResizeImage.Resize(imageOrj, 100, 100);
    imageBig.Save(System.Web.HttpContext.Current.Server.MapPath("~/Images/ProfilePicBig/" + file.FileName));
    Image imageSmall = ResizeImage.Resize(imageOrj, 50, 50);
    imageSmall.Save(System.Web.HttpContext.Current.Server.MapPath("~/Images/ProfilePicSmall/" + file.FileName));

    string[] files = System.IO.Directory.GetFiles(Server.MapPath("~/Images/Temp/"));
    foreach (string pathFile in files)
    {
        System.IO.File.Delete(pathFile);
    }

    return RedirectToAction("Index", "Author");
}
catch (Exception e)
{
    ModelState.AddModelError("", "Kullanıcı bilgileri güncellenirken bir hata oluştu. Lütfen daha sonra tekrar deneyin." + e.Message);
}

```

How can I fix it. Or another better way to keep images as a temp. Should I keep files in a temp folder?

Thanks