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

C

C# programmer

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.
 
M

MikeS

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).
 
C

C# programmer

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.
 
M

MikeS

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
 
R

Registered User

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?
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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top