raklos
raklos

Reputation: 28545

Using ActiveDirectoryMembershipProvider with SqlMembershipProvider

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?

Will this even work? or is there a better obvious way of doing this?

Thanks

Upvotes: 3

Views: 1639

Answers (2)

nWorx
nWorx

Reputation: 2155

could you create a custom role and profile provider?

than you can use the windows username as fk, to reference the user to their roles and profiles.

Upvotes: 0

marc_s
marc_s

Reputation: 755023

When using the ActiveDirectory Membership provider, you're authenticating your users against your Active Directory - there's no separate membership database involved (the user accounts are in Active Directory).

The role provider is using the Active Directory/Windows security groups and a user's membership in those groups - again: no separate role database / table involved.

If you want to use the Active Directory provider, then each new user coming to your site would need to be added to your Active Directory as a regular user account.

You cannot use both membership providers at the same time - either you're going against your AD and use the user accounts and groups defined there - (exclusive) OR you're rolling your own, and store user accounts and roles and user's membership in roles in a separate SQL Server database.

Upvotes: 1

Related Questions