Link to home
Create AccountLog in
Avatar of forsters
forstersFlag for United Kingdom of Great Britain and Northern Ireland

asked on

membership & roles with windows authentication ASP.NET 4.0

Hi Experts,
I'm reading up about membership & roles with a view to implementing personalization.
This will be for an intranet so the authentication is set to Windows authentication on IIS.

To avoid users having to log in there is a piece of code in the page-load event to pick up the username form their existing network session and create a session variable.
Users then see only information linked to their username as dictated by the SQL queries e.g. SELECT * where username = @username

If I want to go forward from this and introduce roles and membership rights to individuals without resorting to login pages, I presume I just need to define some roles in a SQL table and then associate those with individuals etc... or am I missing a trick here?

Avatar of Dustin Hopkins
Dustin Hopkins
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of forsters


Hi dusion,

thank you for those links, just had a quick glance they look helpful,  i'm going to have a good read and come back to you if I may.
I think that is what I want to do, to retain the windows authorization but introduce roles and membership, just not fully understanding the process yet, there seem to be so many ways to restrict/permit access for example we discovered the Authorization Rules on IIS7 this week which seems a wonderfully simple way of setting permissions and i'm trying to sort out in my own mind the difference between that and using roles/membership etc.
These articles really helped me to understand the set-up and process, I have hit a couple of problems in trying to follow an example, but I will post seperate questions for those because in essence my query of "or am I missing a trick" has been answered with a resounding yes.

Thank you for the considered choice of links...each one has really helped.