Author: tevya | Posted on: 7/1/2009 12:34:36 PM | Views : 329

I am trying to pass some messages back from the membership provider to the page that contains the login control.  I am using a custom MembershipProvider and so I figured I would just create an event in my provider and then let the page subscribe/unsubscribe to the event.  The messages would be passed back as event parameters.


Well,  the problem I am hitting is that I do not know when the MembershipProvider object is created by the Membership framework.  When I call Membership.Providers["myProviderNameHere"]  I get null back and so I cannot get back to object to subscribe to its event.
As I understand it, the MembershipProvider is implemented as a pseudo-singleton (only one instance is created AFAIK per site).  I could do something about a static Instance member which is visible to everyone but I really don't want to go there.
So, here are my questions:
What does Membership.Providers["myProvide ...

Go to the complete details ...