473,411 Members | 1,949 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,411 software developers and data experts.

I need a "Profile_MigrateAuthenticated" event - ASPNET 2.0

I known that by using the "Profile_MigrateAnonymous" 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 1353
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_MigrateAnonymous" 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.Page

Protected MustOverride Function GetProfile() As ProfileCommon

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

If currentProfile.IsAnonymous Then
If Not Me.Session("Username") Is Nothing Then
Dim userProfile As ProfileCommon =
currentProfile.GetProfile(Me.Session("Username"))

currentProfile.PreferredTheme =
userProfile.PreferredTheme
currentProfile.PreferredCulture =
userProfile.PreferredCulture
currentProfile.Save()

Me.Session.Remove("Username")
End If
Else
If Me.Session("Username") Is Nothing Then
Me.Session("Username") = currentProfile.UserName
End If
End If

Me.Theme = currentProfile.PreferredTheme

MyBase.OnPreInit(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
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)...
0
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...
6
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
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...
0
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...
4
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...
1
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...
2
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 {...
3
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 :...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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,...
0
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...
0
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...

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.