473,803 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MembershipProvi der/session

I've created a Custom MembershipProvi der, in the user creation i have to
return somehow the ProviderUserKey but inside the MembershipProvi der I have
no access to the session to store the info.
Any suggesions appreciated.
Thanks, Diego
Nov 19 '05 #1
3 2087
As long as your provider is running on same thread as the request you can
access Session by using the HttpContext.Cur rent property.

System.Web.Http Context.Current .Session["MyUserKey"] = "wfobertson "

HTH,

bill

"Diego" <t> wrote in message news:us******** ******@TK2MSFTN GP14.phx.gbl...
I've created a Custom MembershipProvi der, in the user creation i have to
return somehow the ProviderUserKey but inside the MembershipProvi der 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 MembershipProvi der. It's is a unique identifier for the user in your database
that's potentially different that the username. The SqlMembershipPr ovider
uses a GUID column in the database.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I've created a Custom MembershipProvi der, in the user creation i have
to
return somehow the ProviderUserKey but inside the MembershipProvi der 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****@NOSPAMd evelop.com> wrote in message
news:70******** **************@ msnews.microsof t.com...
I think you have misunderstood what ProviderUserKey is supposed to be in a
MembershipProv ider. It's is a unique identifier for the user in your
database that's potentially different that the username. The
SqlMembershipP rovider uses a GUID column in the database.
-Brock
DevelopMentor
http://staff.develop.com/ballen
I've created a Custom MembershipProvi der, in the user creation i have
to
return somehow the ProviderUserKey but inside the MembershipProvi der 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
2558
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 "Enlighten.LinkMad.Businesslogic". In one of my frontend websites I use this type to authenticate a user who is trying to login. The following excerpt is from the web.config of the particular site showing the reference to the custom provider, allowing .Net to do...
2
2635
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 least it's given me a chance to brush up on my Spider Solitaire game. In any event, I am trying to implement a custom MembershipProvider for a website. Why? Because the default one that gets created by the supplied wizard is way over the top, in...
1
2338
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 appear to be any way to debug the Configuration tool. In any event, when I create a new user I get the following error message: An error was encountered. Please return to the previous page and try again. The following message may help in...
5
3265
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 change a username (which the standard MembershipProvider does not allow), add some fields to a user (e.g.: "Area", a few others...) and some other functions I may not think of right now. How could I write my own MembershipProvider while still...
5
4218
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 it no effect when valid user and change password. How can I do?
4
10716
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 cannot get to the OperationContext.Current nor the HttpContext.Current (I am using aspNetCompatibility=true and confirmed that it is enabled in the debugger) - both are null. Is there a setting someplace that will enable these to be available to...
2
1156
by: Ian Semmel | last post by:
Is the MembershipProvider instance unique to a Session ? ie does each session have its own copy ?
5
3571
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 creation of content which adjusts based on the user. I have several pages which require a user to be logged on and several which do not. Prior to this point in time I have used 2 different master pages. one with a control which checks a session...
1
1662
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 an image attribute in the SiteMapNode element. 3. Create an asp.net ProfileProvider from scratch. Does anybody have any links on how to do the above?
0
9700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10546
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7603
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.