How can the location roles be read from the web.config file?
From: Gery D. Dorazio (gdorazio_at_enque.net)
Date: 08/10/04
- Next message: Mike Swaim: "Enabling SQL Server Encryption on developer workstation"
- Previous message: SenthilVel: "ASPX pages :Starting and Stopping Windows services running in remote Systems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 10 Aug 2004 03:28:11 -0400
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
- Next message: Mike Swaim: "Enabling SQL Server Encryption on developer workstation"
- Previous message: SenthilVel: "ASPX pages :Starting and Stopping Windows services running in remote Systems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|