简体   繁体   中英

How to assign Pages to User Roles in Membership and Roles by Custom Asp.net Page

I am creating a web application and i have already created page for creating Roles. but i want that admin should decide in which roles which are the pages or modules that role is authenticated to. I am using built in Membership and Roles.

For Menus i am using Sitemap for security Trimming it is working fine. i just want to make that thing customizable.

I have the option to hard code in web.config but i want to make it customizable.

<location path="Upload.aspx">
  <system.web>
    <authorization>
      <allow roles="Uploader"/>
      <deny users="*" />
    </authorization>
  </system.web>
</location>

Is there any way that we can make this customizable ?

Checkout the open source Web based Web Site Administration tool from UDRI: http://udriwsat.codeplex.com/

I believe they've got rules like that already built in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM