MembershipProvider Question

  • Thread starter Thread starter Ian Semmel
  • Start date Start date
I

Ian Semmel

Is the MembershipProvider instance unique to a Session ? ie does each
session have its own copy ?
 
no, its a static instance. there is only one per application (appdomain).

note: membership does not require/use session.

-- bruce (sqlwork.com)
 
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 ?
 
Back
Top