MembershipProvider Question

I

Ian Semmel

Is the MembershipProvider instance unique to a Session ? ie does each
session have its own copy ?
 
B

bruce barker (sqlwork.com)

no, its a static instance. there is only one per application (appdomain).

note: membership does not require/use session.

-- bruce (sqlwork.com)
 
I

Ian Semmel

But it doesn't appear to be defined as static (in my understanding of the
subject)

eg I can code

public sealed class MySqlMembershipProvider : MembershipProvider
{
int intval;

public int PropertyInt
{
set { intval = value; }
}
}

and then

MySqlMembershipProvider mp = (MySqlMembershipProvider)
Membership.Provider;

mp.PropertyThing = 2;

What do I have in mp? Do I have a session-specific instance of
MySqlMembership provider or is it a single app-wide instance ?
 

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

Forum statistics

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

Latest Threads

Top