473,320 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MembershipProvider/session

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
Nov 19 '05 #1
3 2064
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

"Diego" <t> wrote in message news:us**************@TK2MSFTNGP14.phx.gbl...
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

Nov 19 '05 #2
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'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


Nov 19 '05 #3
I understood I needed it to create a new record in a table linked to my
user.
Thanks, Diego
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:70**********************@msnews.microsoft.com ...
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'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


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
2
by: Mark Olbert | last post by:
So far, I am more than a little underwhelmed by the Membership API in ASPNET2, and the ASP.NET Configuration wizard in VS2005. The latter is slow as a pig whenever it does anything. Oh well, at...
1
by: Mark Olbert | last post by:
I've written a custom MembershipProvider and a custom RoleProvider, and am trying to get them to work with the ASP.NET Configuration tool. Which is a royal pain in the butt, because there doesn't...
5
by: ibiza | last post by:
Hi all, I'd like to write my own MembershipProvider for my ASP.NET 2.0 web application but I fear all the code to write. Basically, I only want to add a few functionalities like being able to...
5
by: ad | last post by:
I have set some limit of MembershipProvider in web.config. <add name="MyMembershipProvider" type="MyMembershipProvider" MaxInvalidPasswordAttempts="3" MinRequiredPasswordLength="6" /> But...
4
by: dgilbert | last post by:
I have a custom membership provider that I am using to authenticate users in a WCF web service hosted IIS. I want to be able to see any cookies that come across and save session variables, but I...
2
by: Ian Semmel | last post by:
Is the MembershipProvider instance unique to a Session ? ie does each session have its own copy ?
5
by: Rory Becker | last post by:
Having now created a Custom MembershipProvider that seems to work correctly with my Logon and ChangePassword controls, I am, as they say, a happy bunny. The next stange is to move on to the...
1
by: Andy B | last post by:
I need to have some simple examples of how to do the following: 1. Create an asp.net MembershipProvider from scratch 2. Extend the existing XMLSiteMapProvider that comes with asp.net to include...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.