ASP.NET 2.0's Membership, Roles, and Profile for different client

Discussion in 'ASP .Net Security' started by C# programmer, Nov 29, 2006.

  1. Hi All,

    We are using ASP.NET 2.0's Membership, Roles, and Profile in our web
    application.This website is used by different clients. The application
    DB is at a central location and all the users for different client are
    stored in the same DB using the default schema of ASP.NET 2.0's
    Membership, Roles, and Profile.

    Till date the users were common for all the clients. So if a user
    registers for Client A he can log into website of Client B also. But
    now we want users to be client specific. Is there any way to make this
    work with the ASP.NET 2.0's Membership, Roles, and Profile?

    Thanks,
    Adarsh.
     
    C# programmer, Nov 29, 2006
    #1
    1. Advertisements

  2. C# programmer

    MikeS Guest

    I am thinking that not without using different copies of the web site
    since changing a providers application name on the fly is global.

    Or perhaps with a custom provider, that rides on top of a group of
    stock providers who only have a different application name, and decides
    which other provider to delegate to based on something or another (like
    a domain qualified user id).
     
    MikeS, Nov 30, 2006
    #2
    1. Advertisements

  3. Thanks Mike for the response.

    We have only 1 copy of website and we just use the URL in different way
    to find out which client it is. We are using only 1 application name
    for all the clients right now as we have users common to all of them.

    Can you please explain me more how can I use custom provider in this
    case.
     
    C# programmer, Nov 30, 2006
    #3
  4. C# programmer

    MikeS Guest

    I suppose that for each kind of provider you would implement the
    provider interface and set that type as the default provider, then in
    each method interrogate the query string (HttpContext.Current.Request)
    and use that to determine which provider from the providers collection
    to delegate to.

    This means you will end up with a n+1 of each kind of provider for n
    customers and so will be unwieldy if you have a lot of customers.

    http://msdn2.microsoft.com/en-us/library/sx3h274z.aspx
     
    MikeS, Nov 30, 2006
    #4
  5. A MembershipUser can have multiple roles. Perhaps assigning roles
    specific to each website might be appropriate. Client A could be
    assigned the role WebsiteAUser with the similar role for client B as
    WebsiteBUser. To use both websites client C would be assigned both
    roles.

    regards
    A.G.
     
    Registered User, Nov 30, 2006
    #5
  6. Thanks Mike and AG for the response.
    I will try it out........
     
    C# programmer, Dec 1, 2006
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.