473,597 Members | 2,331 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 1365
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
8221
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
2157
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
1762
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
1221
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
883
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
1820
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
2348
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
2146
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
8267
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...
1
8024
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
8258
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...
1
5844
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
5423
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
3921
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2394
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
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1229
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.