I'm downloading files from UNC path it is working fine on local host but when hosted on IIS 7 it gives me following error:
My Action in MVC that returns file is:
[ValidateInput(false)]
public FileResult GetFile()
{
Request.ValidateInput();
string fileLocation = ConfigurationManager.AppSettings["UNCPath"];
string fileName = HttpUtility.UrlDecode(Request.QueryString["fileName"]);
string path = Path.Combine(fileLocation, fileName);
string getFileExtension = Path.GetExtension(fileName);
string contentType = MimeTypeMap.GetMimeType(getFileExtension);
return File(path, contentType, fileName);
}
In Web confing I have UNCPath like \network\drivef...