Полученное сообщение об ошибке:
{"L'accès au chemin d'accès 'F: \ ABOUDASADOK WORKSPACE \ new \ TaysirRdlc \ TaysirRdlc \ Reports \ Rdlcs \ Application 2 \ RDLC TEST1\ V88 \ sadek.rdlc 'est refusé. "}
Мое действие:'
public ActionResult Create(Rdlc rdlc, HttpPostedFileBase UploadFile)
{
Application currentApplication = db.Applications.Find(rdlc.ApplicationID);
string AppNamePath = currentApplication.ApplicationName;
string ModulePath = rdlc.Name;
string VersionPath = rdlc.Version;
string rdlcsPath = "Rdlcs";
string reportsPath = @"~\Reports";
string generatedPath = Path.Combine(reportsPath, rdlcsPath, AppNamePath, ModulePath, VersionPath);
string path = Path.Combine(Server.MapPath(generatedPath), UploadFile.FileName);
Directory.CreateDirectory(path).GetAccessControl();
UploadFile.SaveAs(path);
rdlc.File = UploadFile.FileName;
if (ModelState.IsValid)
{
db.Rdlcs.Add(rdlc);
db.SaveChanges();
return Json(new {message = "successfully uploaded" });
}
ViewBag.ApplicationID = new SelectList(db.Applications, "ApplicationID", "ApplicationName", rdlc.ApplicationID);
return View(rdlc);
}
'