I am having a problem where I am trying to delete my file but I get an exception.
if (result == \"Success\") { if (FileUpload.HasFile) { t
This is an old issue, but I ran into it while searching. Turns out that I was missing the actual filename component in the save path for SaveAs...
string uploadPath = Server.MapPath("~/uploads"); file.SaveAs(uploadPath); // BAD file.SaveAs(Path.Combine(uploadPath, file.FileName)); // GOOD