i want to save file upload file in 'C:\inetpub\wwwroot\Content\SpeechFile\' in visual studio i can save this files
if (file != null)
{
string urlfile;
string path = Server.MapPath("~" + "\\Content\\Apk\\");
string filename = System.IO.Path.GetFileName(file.FileName);
while (System.IO.File.Exists(path + "\\" + filename))
filename = "1" + filename;
urlfile = "../../Content/Apk/" + filename;
file.SaveAs(path + filename);
model.Fileurl = urlfile;
}
but on server i have an error
Access to the path 'C:\inetpub\wwwroot\Content\SpeechFile\nokia 700.jpg' is denied.