User410348098 posted
Hi,
I can successfully upload a file using MVC but when the file gets great a little bit I encountered the following error:

This is my codes:
[HttpPost]
public ActionResult SubmitProductCatTizer(MZPDB.ProductCatTizer model, long proCatId, HttpPostedFileBase file)
{
if (ModelState.IsValid)
{
if (file == null)
return RedirectToAction("AddProductCatTizer");
var guid = Guid.NewGuid().ToString("N");
var fullPath = Server.MapPath("~/Uploaded/" + guid + ".mp4");
file.SaveAs(fullPath);
Dbcontex.ProductCatTizers.Add(new MZPDB.ProductCatTizer()
{
Title = model.Title,
Description = model.Description,
ProductCatId = proCatId,
VideoFile = guid,
Status = true
});
Dbcontex.SaveChanges();
return RedirectToAction("ListProductCatTizer", "ListAdmin", new { area = "AdminPanel" });
}
return View("AddProductCatTizer");
}