2
Answers

path access denied

Good day 

please assisst i get the error access denied to the path, also note that i gave everyone full control rights on the folder. 

here is my code

if (e.CommandName == "Download")
                {
                    Response.Clear();
                    Response.ContentType = "application/octec-stream";
                    Response.AppendHeader("content-disposition", "filename" + e.CommandArgument);
                    Response.TransmitFile(Server.MapPath("~/POP") + e.CommandArgument);
                    Response.End();
                }

Answers (2)
1
cedrick moloto

cedrick moloto

NA 9 811 2y
@Sanchin Singh, i have put on the full path and the folder is not read only
1
Sachin Singh

Sachin Singh

11 55.8k 87.3k 2y

Make sure

  • Path is not a directory (folder) path. (It should be complete path to the file)
  • Path specified is  not a read-only file.