473,831 Members | 2,324 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 2088
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
2559
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
2637
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
2339
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
3266
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
10717
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
3576
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
9793
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
10494
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...
1
10534
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9317
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
7748
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
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3963
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
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.