MembershipProvider/session

  • Thread starter Thread starter Diego
  • Start date Start date
D

Diego

I've created a Custom MembershipProvider, in the user creation i have to
return somehow the ProviderUserKey but inside the MembershipProvider I have
no access to the session to store the info.
Any suggesions appreciated.
Thanks, Diego
 
As long as your provider is running on same thread as the request you can
access Session by using the HttpContext.Current property.

System.Web.HttpContext.Current.Session["MyUserKey"] = "wfobertson"

HTH,

bill
 
I think you have misunderstood what ProviderUserKey is supposed to be in
a MembershipProvider. It's is a unique identifier for the user in your database
that's potentially different that the username. The SqlMembershipProvider
uses a GUID column in the database.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
I understood I needed it to create a new record in a table linked to my
user.
Thanks, Diego
 

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

Back
Top