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

Saving profile information for a specific user when not logged in

I want to be able to store profile information for a user when they
sign up for an account...but BEFORE they can log in. Can this be done
using any of the built-in profile methods?

Here's my current sign-up procedure:

1. User creates an account with username, password, e-mail and other
information that I want to store in profile.

2. User is created as inactive and NOT logged in. Besides the profile
stuff, I use the membership object to accomplish this. I want to
store profile information right here while they are NOT logged in.

3. I send an e-mail to the user with an activate link. The link is to
an activate page with the UserId guid added as a querystring.

4. After visiting the activate link (and thus validating their e-mail
account) they are activated. I read the guid from the querystring.
Using the membership object, I look up the user by the guid and
activate them.

I'm using a custom SQLTableProvider for the profile info (storing in
separate columns), so I know I could just use my custom sprocs to
insert the data. But I was wondering if I could do so using the
default provider object. None of my profile items allow anonymous. I'm
wondering if I can load a profile for a specific user and set the
properties.

Thanks,

Jason

Apr 30 '07 #1
3 2162
Short answer:
<system.web>
<anonymousIdentification enabled="true"/>
<trust level="Medium"/>
<profile >
<properties>
<add name="Name" allowAnonymous="true" />
<add name="Age" allowAnonymous="true" type="System.Int16"/>
</properties>
</profile>
<compilation debug="true"/>
</system.web>

--Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"daokfella" wrote:
I want to be able to store profile information for a user when they
sign up for an account...but BEFORE they can log in. Can this be done
using any of the built-in profile methods?

Here's my current sign-up procedure:

1. User creates an account with username, password, e-mail and other
information that I want to store in profile.

2. User is created as inactive and NOT logged in. Besides the profile
stuff, I use the membership object to accomplish this. I want to
store profile information right here while they are NOT logged in.

3. I send an e-mail to the user with an activate link. The link is to
an activate page with the UserId guid added as a querystring.

4. After visiting the activate link (and thus validating their e-mail
account) they are activated. I read the guid from the querystring.
Using the membership object, I look up the user by the guid and
activate them.

I'm using a custom SQLTableProvider for the profile info (storing in
separate columns), so I know I could just use my custom sprocs to
insert the data. But I was wondering if I could do so using the
default provider object. None of my profile items allow anonymous. I'm
wondering if I can load a profile for a specific user and set the
properties.

Thanks,

Jason

Apr 30 '07 #2
Yes, that will allow me to store profile information. But how does
that create a profile record with the same userId as the membership I
just created?

Apr 30 '07 #3
It doesn't and you don't. You use the MigrateAnonymous event:

http://msdn2.microsoft.com/en-us/lib...anonymous.aspx
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"daokfella" wrote:
Yes, that will allow me to store profile information. But how does
that create a profile record with the same userId as the membership I
just created?

Apr 30 '07 #4

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

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
0
by: kehmka | last post by:
Hello, I need to understand the full scope of changing the Profile.UserName property when a user goes from anonymous to authenticated. It's read-only and essential to acquiring profile...
1
by: Arnie | last post by:
How can I access Profile information for a non-logged-in user from an app_code business object? I can get Profile info for the logged -in user via HttpContext.Current.Profile. I can get...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
1
by: Giovanni | last post by:
Dear Friends, I am having problems with the following: I have added a Login control to a web page. In the Login control's Authenticate event, I am performing additional validation against our...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
1
by: Rusty Hill | last post by:
My site does not allow anonymous users. After a user has logged in and been authenticated I need to access some information in their profile object. I thought I would do this in the LoggedIn...
1
by: kpg* | last post by:
Hi all, Trying to use the ASP.NET 2.0 membeship API to manage users and user profiles, and of course, to provide role based security to my web app. I have several attributes I want to users,...
0
by: TimVtoo | last post by:
Hi. I want administrators in my intranet application to be able to create new users and save Profile information (such as FirstName, LastName etc.) without having to login as that user. I can save...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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...

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.