RE: Multiple Membership providers and AddUserToRole



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.

.



Relevant Pages

  • Re: Re: ADODC1 and ADODC3 PROVIDER CANNOT BE FOUND ERROR [multiposted]
    ... 5th) Runtime error '91' - Object variable or With block variable not ... may cause multiple people to respond to your ... an access 97 Dahe database! ... Provider cannot vbe found. ...
    (microsoft.public.vb.database.ado)
  • Received doc with changes showing
    ... We received a document from an outside source and the tracked changes all ... The provider said that she has sent the same document to multiple ... parties and no one else can see the changes. ...
    (microsoft.public.word.docmanagement)
  • Re: Microsoft Access and Multiple result sets
    ... I am talking specifically about the limitations of the Jet Provider. ... But that is a function of SQLOLEDB provider - it can process multiple ...
    (microsoft.public.data.ado)
  • Re: ADODC1 and ADODC3 PROVIDER CANNOT BE FOUND ERROR [multiposted]
    ... may cause multiple people to respond to your ... post a single message and select all ... > an access 97 Dahe database! ... > Provider cannot vbe found. ...
    (microsoft.public.vb.database.ado)
  • RE: Multiple Membership providers and AddUserToRole
    ... Nice to hear from you and sorry for the delay response. ... "Provider" property refer to the default RoleProvider configured for the ... and do not need to explicitly set ApplicationName for the role provider. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet.security)