G
Gery D. Dorazio
Security Experts,
I have a config file such as this:
<configuration>
<system.web>
<!--- other stuff goes here -->
<authentication mode="Forms">
<forms name=".MyWebsite" loginUrl="Login.aspx" protection="All"
timeout="60" path="/"></forms>
</authentication>
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
</system.web>
<location path="Admin" allowOverride="false">
<system.web>
<authorization>
<allow roles="Admin" />
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="Account" allowOverride="false">
<system.web>
<authorization>
<allow roles="User,Admin" />
<deny users="?"/>
</authorization>
</system.web>
</location>
</configuration>
As you can see there are two directories 'Admin' and 'Account' which have
respectively the roles "Admin" and "User,Admin". I would like to be able to
programmatically read these role values from withing ASP.NET. How can I do
it?
Thanks,
Gery
--
Gery D. Dorazio
Development Engineer
EnQue Corporation
1334 Queens Road
Charlotte, NC 28207
(704) 377-3327
I have a config file such as this:
<configuration>
<system.web>
<!--- other stuff goes here -->
<authentication mode="Forms">
<forms name=".MyWebsite" loginUrl="Login.aspx" protection="All"
timeout="60" path="/"></forms>
</authentication>
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
</system.web>
<location path="Admin" allowOverride="false">
<system.web>
<authorization>
<allow roles="Admin" />
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="Account" allowOverride="false">
<system.web>
<authorization>
<allow roles="User,Admin" />
<deny users="?"/>
</authorization>
</system.web>
</location>
</configuration>
As you can see there are two directories 'Admin' and 'Account' which have
respectively the roles "Admin" and "User,Admin". I would like to be able to
programmatically read these role values from withing ASP.NET. How can I do
it?
Thanks,
Gery
--
Gery D. Dorazio
Development Engineer
EnQue Corporation
1334 Queens Road
Charlotte, NC 28207
(704) 377-3327