NoviceToDotNet
NoviceToDotNet

Reputation: 10805

how to set roles to limit the access of pages in asp.net?

I am developing a asp.net web site, having folders student, admin..i both student and admin folder have registration and login page, i want to know how can i access limit of admin folder pages by any user. Basically i want that the admin folder registered ppl should have access to all the pages of student section if they can login using Id, Password...but i don't want any of student to access even the login page of admin section irrespective of even any student know URl for the admin login page, registration page(because i don't want him to register at all) also i want to know ho can i again sub divide the a few limits for the some other admin. Basically i want to set roles that admin can access all web site pages but student even cant access that admin folders pages and again some different kind of admin cant access a few pages from the same admin section page please elaborate me on this how can i achieve this ?

Upvotes: 0

Views: 847

Answers (1)

Waleed Al-Balooshi
Waleed Al-Balooshi

Reputation: 6406

I would recommend looking at the Role Manager that is built into ASP.Net starting with version 2.0. Rather than attempting to explain all the details I am providing the following How To from MSDN that will show you How To: Use Role Manager in ASP.NET 2.0.

Once you start using it you can then come back and post some more specific questions if you have any problems.

Upvotes: 1

Related Questions