Friday, May 21, 2010

How to Implement Role-Based Security with Forms-Based Authentication in Your ASP.NET Application?

Because forms users usually are not Microsoft Windows users, they do not have any roles associated with them by default. Thus, you must attach the roles of the authenticating user to that user's identity so that you can implement the role-based security inside your code.





Use the sample code in this section to implement role-based security in your application. This sample code assigns pre-specified roles to the authenticating user. Depending how you store your user data, you can implement your own method to retrieve the roles for that authenticated user and attach those roles to the authenticating user's identity, which is illustrated in the sample code to follow.





Read more on How to Implement Role-Based Security with Forms-Based Authentication in Your ASP.NET Application by Using Visual Basic .NET at http://www.buzzycode.com/ShowArticles-id...

How to Implement Role-Based Security with Forms-Based Authentication in Your ASP.NET Application?
you first have to use ASP.NET website configuration. You'll be directed to a browser based configuration for your site. Click on the enable roles button, and click on the manage roles to add/modify/delete roles.





You can also assign users to roles in the configuration window.


No comments:

Post a Comment