I have written code to upload excel files in .net MVC web application. its working fine on local host as not working on win host server its catching error Access to the path in denied.I already grant permission and added full control in filezilla folder listing.but still showing error :Access to the path is denied.Is there any thing i missed where i need to grant permission.
My code is as below:
String laborpath="~/ExcelUploads/Labor_Excel/";
String filename=Request.Files["FileUpload1"].FileName
string filePath= string.Format(Server.MapPath(laborpath)+ filename);
foreach (string inputTagName in Request.Files)
{
HttpPostedFileBase Infile = Request.Files[inputTagName];
Infile.SaveAs(filePath);
}