J
Jonathan Wood
I have three roles: Admin, Trainer, and Client. Client pages are in my root
folder, Admin pages are in my Admin subfolder, and Trainer pages are in my
Trainer subfolder. No users can access any pages not matching their role.
In order to enforce this, I have the following in my web.config:
<authorization>
<allow roles="Client" />
<deny users="*" />
</authorization>
I also need to add web.config files and rules in my Admin and Trainer
subfolders.
That seems to work except that the rules above apply to any subfolders
without a web.config file. So, for example, Trainer and Admin users cannot
access my images (~/images) and stylesheets (~/style), etc.
Is it necessary to now place yet another web.config file in each shared
folder such as images and style? Or is there an easier way to deal with
this?
Thanks.
folder, Admin pages are in my Admin subfolder, and Trainer pages are in my
Trainer subfolder. No users can access any pages not matching their role.
In order to enforce this, I have the following in my web.config:
<authorization>
<allow roles="Client" />
<deny users="*" />
</authorization>
I also need to add web.config files and rules in my Admin and Trainer
subfolders.
That seems to work except that the rules above apply to any subfolders
without a web.config file. So, for example, Trainer and Admin users cannot
access my images (~/images) and stylesheets (~/style), etc.
Is it necessary to now place yet another web.config file in each shared
folder such as images and style? Or is there an easier way to deal with
this?
Thanks.