I'm using MS SQL 2005 database... I do have those web.config files on the folders that I want to protect, here is one example:
1. This folder allowed logged in "Users" - Users is one of the role that I defined in the Membership.
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<allow roles="Admin" />
<allow roles="SuperUser" />
<allow roles="Users" />
<deny users="?" />
</authorization>
</system.web>
</configuration>
2. This is the Admin folder where only Admin or SuperUsers (again, Admin & SuperUser are roles that I defined) can access:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
<allow roles="Admin" />
<allow roles="SuperUser" />
<deny users="*" />
</authorization>
</system.web>
</configuration>
Like I said, it works fine on my local machine, but not on the server.
Thanks,
Kenny.