Login question for ASP.NET - Allow page by user

ptemo used Ask the Experts™
Hello all,

I would like to allow certain pages to be restricted except for a  few users.  Most of the things I see on the web allow restrictions by folders, but not by indivdual page.  I'm using ASP.net 3.5 with visual studio 2010.  

Thank you
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Does your users belongs to same role? Then you can implement role-based authorization for the pages. Also, If all the users are not of same role than you need to implement custom logic in each page load. But in that case your number of users should be very low.



Thank you for responding.  Yes the users belong to the same role.  How do implement a role based authorization.

You can try using User.IsInRole.  Check the role-based security part within the link.


Check the Alred1's link. You can check if the user is of particular role and than redirect him/her if he is not allowed to access content.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial