I want to create a web-app (a website) used in house by staff only.
I want to use active directory membersip provider to authenticate users. The thing that is confusing me is how do I manage profiles and roles, and also link users with a FK to other tables.
So far Im thinking of doing something like this but not sure if it is even possible?
- use Windows authentication (set in web.config)
- use activedirectorymembership provider + sqlmembership provider?
- Register users the first time they hit the site (get their email, name, etc from AD and create user in code and add to sql db)
- Everytime they re-hit the site, check the db if the user exists, if they do, log them in, if not create a new user in sqlmembership.
- for all other tables use userid from Aspnet_User as an FK in other tables
Will this even work? or is there a better obvious way of doing this?
Thanks