Quick ASP.NET Security
By Luther Miller, September 01, 2003
Using inheritance, reflection, and attributes, you can quickly create application roles in an ASP.NET project that can map to real Windows groups in the web.config file, and enforce these roles throughout the application by simply defining an attribute for each page.
Quick ASP.NET Security
Listing 3 Possible settings for a test site
<appSettings>
<add key="RoleAdmin" value="SOFTAGON\Maya_Admin,SOFTAGON\MayaTest_Admin"/>
<add key="RoleManager" value="SOFTAGON\MayaTest_Manager"/>
<add key="RoleHR" value="SOFTAGON\MayaTest_HR"/>
<add key="RoleEditor" value="SOFTAGON\MayaTest_Editor"/>
</appSettings>