473,699 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I need a "Profile_Migrat eAuthenticated" event - ASPNET 2.0

I known that by using the "Profile_Migrat eAnonymous" event I can
migrate my anonymous users profile to their authenticated account
profile, but I would like to carry over some of the properties of their
authenticated account profile back to anonymous profile when they
logout.

How can I do that?

Thanks !

Jan 1 '06 #1
2 1369
Hmm, that's sort of hard, since you're not sure when they logout, especially
if it's simply due to cookie timout (meaning they don't make a request to
the server, yet they timeout and thus arelogged out). If this is an absolute
requirement, then you probabaly should keep the anon profile in synch with
the logged in profile when updates are necessary tot he logged in profile.
Sounds icky, though :(

-Brock
DevelopMentor
http://staff.develop.com/ballen
I known that by using the "Profile_Migrat eAnonymous" event I can
migrate my anonymous users profile to their authenticated account
profile, but I would like to carry over some of the properties of
their authenticated account profile back to anonymous profile when
they logout.

How can I do that?

Thanks !

Jan 1 '06 #2
Thanks for your help. Something you said about synchronizing helped me
solve my problem. Have an Happy New Year !!!

Public MustInherit Class MyPage
Inherits System.Web.UI.P age

Protected MustOverride Function GetProfile() As ProfileCommon

Protected Overrides Sub OnPreInit(ByVal e As System.EventArg s)
Dim currentProfile As ProfileCommon = Me.GetProfile

If currentProfile. IsAnonymous Then
If Not Me.Session("Use rname") Is Nothing Then
Dim userProfile As ProfileCommon =
currentProfile. GetProfile(Me.S ession("Usernam e"))

currentProfile. PreferredTheme =
userProfile.Pre ferredTheme
currentProfile. PreferredCultur e =
userProfile.Pre ferredCulture
currentProfile. Save()

Me.Session.Remo ve("Username")
End If
Else
If Me.Session("Use rname") Is Nothing Then
Me.Session("Use rname") = currentProfile. UserName
End If
End If

Me.Theme = currentProfile. PreferredTheme

MyBase.OnPreIni t(e)
End Sub
End Class

Brock Allen wrote:
Hmm, that's sort of hard, since you're not sure when they logout, especially
if it's simply due to cookie timout (meaning they don't make a request to
the server, yet they timeout and thus arelogged out). If this is an absolute
requirement, then you probabaly should keep the anon profile in synch with
the logged in profile when updates are necessary tot he logged in profile.
Sounds icky, though :(

-Brock
DevelopMentor
http://staff.develop.com/ballen


Jan 1 '06 #3

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

Similar topics

2
8229
by: Andrew J Fortune | last post by:
Hello all, I am trying to ascertain the difference, in terms of access and privileges, between the Internet Guest User Account (IUSR_machinename, where machinename is the name of your computer) vs. the ASPNET user (ASP.NET machine account). If you write a web application, you can configure it via its web.config file. One of the things you can do is set the impersonate attribute in the <identity> tag. If you set it (impersonate) to...
0
2161
by: JT | last post by:
Microsoft Please Help!!! Can anyone out there give me a definitive explanation on EXACTLY what rights an account needs to be able to both create and write to the NT Event Log from ASP.NET in windows 2000 and 2003 server? I would like to see a list of files and registry keys are required for the aspnet account to perform this functionality... This seems to be an issue on any machine that I install on... My event log class looks...
6
1767
by: Julia Briggs | last post by:
Hi, can someone help me put together a if (event.keyCode function, that will detect when the # character is pressed twice, and then dosomething() ? Sincerely, %Julia%
0
1226
by: kiosmy | last post by:
I'm doing a chat, if one user close the windows throw X button of the windows, I need one event to do an action (delete the user for example) how I can do it. In JavaScript exist onunload event, but is execute when the page is submited, asp.net bring a solution for this thanks
0
884
by: Marc Robitaille | last post by:
Hello, I have some combox on a multipage object. I need the OnSelectedIndexChanged of one of the combobox but since it is on a multipage object, I don't have any clue how to do it. Is it possible to have an event of an object that it is on a multipage ? If yes, how can I do that? Thank you Marc
4
1824
by: Justin | last post by:
Hi All, Can the ASPNET user be deleted on an end user's machine that will run .NET applications? I heard someone say it was only needed on the developers machine. Sounded odd to me but I thought I'd ask. Cheers
1
1434
by: Vagabond Software | last post by:
I'm just getting started with ASP.NET, but I have a strong grasp of C# and VB.NET. When my ASPX page loads, I set focus to a text box that will be populated by a barcode scanner. All of that is working fine. Once the barcode is scanned, I want to call my ProcessBarcode method without the end-user needing to click anything or press the enter key. I saw the following example and added it to me page_load (if not postback) event, but...
2
2353
by: muler | last post by:
Hi all, I can't figure out why we need the 'event' keyword, because without having it I can accomplish the same thing. So, why do we need to put the event keyword? namespace DelegateEx { delegate void BeastCaptured(string msg); class A
3
2155
by: aashishn86 | last post by:
var weekend = ; var weekendColor = "#e0e0e0"; var fontface = "Verdana"; var fontsize = 1; var gNow = new Date(); var ggWinCal; isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false; isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
0
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9184
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
9048
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
8931
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
8892
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5878
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
4635
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3064
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
2359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.