c# - Permission issue on server (file i/o write issue) -
there application uploads zip file , extracts in temp folder located under application folder , copies these extracted file different target location , deleted these temporary extracted files temp folder. everything works fine on local machine on iis when place same code on server machine give file i/o permission error ,even though have given full access permission temp , target location folder. can me on this??
here same code
string path = server.mappath("~/uploadedzipfiles/" + filename); fileupload1.saveas(path);//saves zip in temporary folder extractzip(filename, targetfolder); //extracts zip folder contains //target folder path
you must grant full access permission iis user each folder app need write,delete or edit files.
i think aren't well.
for more info how add permission , try these:
- iis_iusrs , iusr permissions in iis8
- https://support.gearhost.com/hc/en-us/articles/200342205-how-to-give-write-access-to-files-for-iusr
update:
there libraries zip & unzip files in c# used on our projects. suggest check them well:
- sharpziplib -> http://icsharpcode.github.io/sharpziplib/
- dotnetzip -> http://dotnetzip.codeplex.com/
- zipstorer -> http://zipstorer.codeplex.com/
Comments
Post a Comment