RE: Multiple Membership providers and AddUserToRole
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Mon, 18 Sep 2006 07:40:40 GMT
Thanks for your reply MrGrundh,
After your further description, I think you're right. A single role
provider with multiple membership user providers will not work here,
especially when you want to utilize the declarative role based
authorization in the web application.
When we use single RoleProvider, it always use the fixed applicationName
(configured in the provider configuration in web.config) and when we add
user into a role, it always assume the user is also in this applicationName
and will not add additional information to distince users in different
application.
So far I haven't found any perfect means on this. What we can get is as
below:
** if still use single provider to store roles for multiple application,
we'll not be able to handle duplicaetd usernames (in different application)
scenario.
** if use multiple role providers, there won't have user/role collision
issue, however, in such case, we will need to explicitly use the correct
role provider (according to applicationName) programmtically and lose the
declarative role based authroization feature (since ASP.NET role based
authorization only use the default role provider).
Actually this is also due to the limitation of the membership/role
provider, they're originally designed for manipulating users/roles in a
single application only and for your scenario, it is a bit beyond the
built-in ability.
Anyway, please feel free to let me know your consideration or if you have
any other questions on this.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- RE: Membership.ApplicationName and thread safety.
- From: Steven Cheng[MSFT]
- RE: Membership.ApplicationName and thread safety.
- From: Steven Cheng[MSFT]
- RE: Membership.ApplicationName and thread safety.
- From: Steven Cheng[MSFT]
- RE: Membership.ApplicationName and thread safety.
- From: Steven Cheng[MSFT]
- RE: Multiple Membership providers and AddUserToRole
- From: Steven Cheng[MSFT]
- RE: Multiple Membership providers and AddUserToRole
- From: MrGrundh
- RE: Membership.ApplicationName and thread safety.
- Prev by Date: Re: How to get the USERID
- Next by Date: ASP 2.0, C#, LDAP Login, and Forms impersonation?
- Previous by thread: RE: Multiple Membership providers and AddUserToRole
- Next by thread: Re: Forms Authentication Problem
- Index(es):
Relevant Pages
|