asp.net mvc - Unable to access files from UNC path in ASP.MVC aplpication hosted in IIS7 -


i'm downloading files unc path working fine on local host when hosted on iis 7 gives me following error: enter image description here

my action in mvc 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 have uncpath \network\drivef...


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -