Uploading a file in asp.net in one of the folders listed in the solution explorer -
i trying upload file asp.net website. issue want file saved on web server in 1 of folders included in solution of website while developing in visual studio.
i not able access rights folder , wonder how user have access folder. want save file in folder , allow other users download it.
fileupload1.postedfile.saveas(server.mappath("~/folder"));
the error is:
access path 'c:_________________________________is denied system.unauthorizedaccessexception
any suggestions welcome.
thank you
shaleen
you should grant read , write permissions aspnet / network service user specified folder. if reason stuck on this, can test set write permissions user verify problem resolved. after remove permissions , test again network service account.
check msdn article more information http://msdn.microsoft.com/en-us/library/ff647402.aspx.
Comments
Post a Comment