c# - Access to the path is denied while using FileUploadControl -
I am trying to save an uploaded file:
string SaveLocation = Server.MapPath (@ "~ \ data"); FileUploadControl.SaveAs (SaveLocation);
I've given the full control
permission for the following code to save both solutions and targets:
- Network Service
- IIS_IUSRS
- ASP.NET / Markin
- IUSR
I received the & lt; Identity impersonate is determined = "False" />
.
I tried all of the above methods but still are not able to reach the path:
Error: Path is denied
I know what I have to do to reach the path.
requires a full filename, not only the directory you passed.
string SaveLocation = Server.MapPath (@ "~ \ data \ somefile.png"); FileUploadControl.SaveAs (SaveLocation);
Every time you upload a file, make sure to change the file path, or the file will be overwritten.
Comments
Post a Comment