473,669 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Profile not saving

Hello,

I am using asp.net20 membership. I have some properties in
web.config

<properties>
<add name="FirstName " type="System.St ring" allowAnonymous= "true"/>
<add name="LastName" type="System.St ring" allowAnonymous= "true"/>
<add name="JobTitle" type="System.St ring" allowAnonymous= "true"/>

<properties>

in my update profile code i have

ProfileCommon pc =
(ProfileCommon) System.Web.Prof ile.ProfileBase .Create(Members hip.GetUser().E mail,
true);
pc.FirstName = MemberFirstName ;
pc.LastName = MemberLastName;
pc.JobTitle = MemberJobTitle;
pc.Save();

I dont get any errors and nothing gets saved. When the member first
registers and enters these profile fields they are captured and saved
however when user later tries to update they cannot.

Anyone any ideas.

Thanks in advance.

Ismail

Mar 7 '07 #1
4 2162
On Mar 7, 5:08 pm, "Ismail" <ismail.ma...@i assmarts.comwro te:
Hello,

I am using asp.net20 membership. I have some properties in
web.config

<properties>
<add name="FirstName " type="System.St ring" allowAnonymous= "true"/>
<add name="LastName" type="System.St ring" allowAnonymous= "true"/>
<add name="JobTitle" type="System.St ring" allowAnonymous= "true"/>

<properties>

in my update profile code i have

ProfileCommon pc =
(ProfileCommon) System.Web.Prof ile.ProfileBase .Create(Members hip.GetUser().E mail,
true);
pc.FirstName = MemberFirstName ;
pc.LastName = MemberLastName;
pc.JobTitle = MemberJobTitle;
pc.Save();

I dont get any errors and nothing gets saved. When the member first
registers and enters these profile fields they are captured and saved
however when user later tries to update they cannot.

Anyone any ideas.

Thanks in advance.

Ismail
If I am not wrong, you should authenticate the user first.

Cheers,
Miguel

Mar 7 '07 #2
Unless the email is also the user name, or you are using a custom profile
provider, you are not pulling up the user. You can test this in debug by
setting a breakpoint here:
>pc.FirstName = MemberFirstName ;
See if you have an object that is filled with your user.

The signature for Create is UserName, not email, so check this.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** ***************
Think outside the box!
*************** *************** ***************
"Ismail" <is**********@i assmarts.comwro te in message
news:11******** **************@ j27g2000cwj.goo glegroups.com.. .
Hello,

I am using asp.net20 membership. I have some properties in
web.config

<properties>
<add name="FirstName " type="System.St ring" allowAnonymous= "true"/>
<add name="LastName" type="System.St ring" allowAnonymous= "true"/>
<add name="JobTitle" type="System.St ring" allowAnonymous= "true"/>

<properties>

in my update profile code i have

ProfileCommon pc =
(ProfileCommon) System.Web.Prof ile.ProfileBase .Create(Members hip.GetUser().E mail,
true);
pc.FirstName = MemberFirstName ;
pc.LastName = MemberLastName;
pc.JobTitle = MemberJobTitle;
pc.Save();

I dont get any errors and nothing gets saved. When the member first
registers and enters these profile fields they are captured and saved
however when user later tries to update they cannot.

Anyone any ideas.

Thanks in advance.

Ismail
Mar 7 '07 #3
Guys thanks for the replies,

Miguel the user is authenticated becuase you cannot get to this code
unless logged in and authenticated. Greg, The email is not the user
name but the user that I am pulling up is the correct user I can see
this from the name and last name and email properties. In the
web.config I have automaticSaveEn abled="false" does that need to be
true?

Regards

Ismail

Mar 7 '07 #4
Greg,

I am an idiot!! You were on the right track I just changed the email
to username and all works.

Many thanks for this.

Regards

Ismail

Mar 7 '07 #5

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

Similar topics

0
1344
by: Miguel Dias Moura | last post by:
Hello, I am working on an Asp.Net 2.0 / SQL 2005 web site. I am using profile to save the users info on the database. For example, I have the following structure: Public Structure Name Public First As String Public Last As String End Structure
0
1345
by: Miguel Dias Moura | last post by:
Hello, I am saving a complex type in Asp.Net 2.0 profile. I am using an SQL 2005 database as a profile provider. I have been consulting MSDN as help to create my class. (Please, see my code at the end of this post) OBJECTIVE: - Save the documents published by each user in profile.
0
887
by: Miguel Dias Moura | last post by:
Hello, I am saving information about each user in Asp.Net 2.0 profile a using complex type, i.e., a class. I am using a SQL 2005 database as the profile provider. I am also saving the published documents of each user using a <Serializable()> class. My objective is to be able to:
1
1309
by: sonic | last post by:
so, profile provider is a way to save application preferenes for each user. the profile can be replaced to provide a different persistance layer, and/or schema, but what about tweaking it to work in page level, to save preferences for all controls on each page for example. in a application with 100's of sites, containing many of the same controls, i'd like to be able to persist different states of controls depending on the page, and also...
6
8114
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 picture of themselves to their profile... I admit that I'm a newbie... but this is how I understand this:
2
1392
by: jdp | last post by:
I've created a custom login control with values that are not used in the Membership table. I created these other fields through the <profiletag in the web config. I'm able to get a new member created my calling membership.create user and get the other fields saved by creating an instance of ProfileBase, calling SetPropertyValue("property",value) mulitple times for each property, and finally calling the Save method. My first question is:...
6
1913
by: shapper | last post by:
Hello, What is the profiler provider type when using a Microsoft Access database? Thanks, Miguel
3
2173
by: daokfella | last post by:
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
2
3110
MattFitzgerald
by: MattFitzgerald | last post by:
Hi hope some one can help I have 2 questions:- Question 1) When saving a file in access to excel how do I specify current date Question2) When saving a file in access to excel how do I specify current user profile To be more specific I have a Macro in MS Access and I have selected Action "Output to" The Output file is currently set to:-
0
8383
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
8803
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
8587
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,...
1
6210
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
5682
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
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
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
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
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.