MembershipProvider/session

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
 
W

William F. Robertson, Jr.

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
 
B

Brock Allen

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

Diego

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top