Reputation: 5635
i create a folder on my root domain as "NewFolder".
i want to create files on this folder on my sub domain.
set this lines in my web config to allow all user to have access to this folder:
<location path="NewFolder">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
but i get "Access denied." when i want to upload or create file. it is very interesting for me when i go to my Plesk panel (of my site hosting) and set allow anonymous user permission to read and write i can upload and create file successfully.
what is deference between do this from Plesk panel and set configs in config file? i think in my case config settings not works.
Upvotes: 0
Views: 4191
Reputation: 1106
You cannot set this via the web.config file, you have to do it using the file system (and grant file system permissions to the user account running the application pool of your website / application).
There is a step by step tutorial at this link: https://stackoverflow.com/a/16948507/375304
What you are doing with your current web.config is simply allowing non-authenticated users to access the pages/files in the "/NewFolder" folder (nothing to do with file system permissions).
You can find more information here: http://msdn.microsoft.com/en-us/library/eeyk640h(v=vs.100).aspx
Upvotes: 1