Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: ASP.NET Website Programming Problem-Design-Solution
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 11th, 2003, 03:11 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Congo, Democratic Republic of.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default MyAccount.aspx : can't modify email address

Hello all. If you try to modify the email address in my account.aspx the following error occurs. Is there a fix for this?

Page Error

--------------------------------------------------------------------------------
An unexpected error has occurred on this page. The system administrators have been notified. Please feel free to contact us with the information surrounding this error.
The error occurred in: http://localhost/ThePhile/default.aspx
Error Message: Exception of type Wrox.WebModules.AppException was thrown.
--------------------------------------------------------------------------------
Stack Trace:
Wrox.WebModules.AppException: Exception of type Wrox.WebModules.AppException was thrown. at Wrox.WebModules.Accounts.Data.User.Retrieve(String emailAddress) in c:\wrox\thephile\modules\accounts\accountsdata\use r.cs:line 103 at Wrox.WebModules.Accounts.Business.SiteIdentity..ct or(String currentEmailAddress) in C:\wrox\ThePhile\Modules\Accounts\ACCOUNTSBUSINESS \SiteIdentity.cs:line 63 at Wrox.WebModules.Accounts.Business.PhilePrincipal.. ctor(String emailAddress) in C:\wrox\ThePhile\Modules\Accounts\ACCOUNTSBUSINESS \PhilePrincipal.cs:line 79 at Wrox.ThePhile.Web.PhilePage.PhilePage_Load(Object sender, EventArgs e) in C:\wrox\ThePhile\PhilePage.cs:line 75 at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()

Kim Gjerstad
__________________
Kim Gjerstad
  #2 (permalink)  
Old July 11th, 2003, 07:41 AM
Friend of Wrox
 
Join Date: May 2003
Location: Delhi, Delhi, India.
Posts: 230
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Kim,

We are working on your problem and get back yo you soon. Also inform us about your Platform information such as Version of operating system , is there any service packs are applied and which version of Visual Studio you are using.

Charul Shukla
  #3 (permalink)  
Old July 11th, 2003, 11:18 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Congo, Democratic Republic of.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Naturally,

Win2k Professionnal, SPack3
VS.net version 7.0.9466 using C#.
Browser:IE 6.0

Kim Gjerstad
  #4 (permalink)  
Old July 13th, 2003, 05:23 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

See my post here:

http://p2p.wrox.com/topic.asp?TOPIC_ID=1389


  #5 (permalink)  
Old August 31st, 2003, 09:13 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi charul_shukla,

What's the status of your email address modification update. I'm trying to figure out what's the best way to go about doing this. Hope you have a solution soon.

Thanks,
d


  #6 (permalink)  
Old September 17th, 2003, 01:52 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is a way to be able to modify the Email Address from myaccount.aspx. I must give credit to Gjerstad for the posting at http://p2p.wrox.com/topic.asp?TOPIC_ID=1389

Anyway the code in bold is new code for the code behind on myaccount.aspx for the button click event:

private void SubmitChanges_Click(object sender, System.EventArgs e)
        {
            // formulate a call to the update method on the user object to
            // save the user changes to the database.
            SaveMessage.Visible = false;

            if (Page.IsValid)
            {
                if ( ((SiteIdentity)User.Identity).TestPassword( CurrentPassword.Text) == 0)
                {
                    // display appropriate password failure message
                    SaveMessage.Text = "The password you supplied is incorrect.<br>";
                    SaveMessage.Visible = true;
                }
                else
                {
                    try
                    {
                        Wrox.WebModules.Accounts.Business.User currentUser =
                            new Wrox.WebModules.Accounts.Business.User(
                            (Wrox.WebModules.Accounts.Business.PhilePrincipal) Context.User);

                        //This if statment is new code; initials developerz
                        //http://p2p.wrox.com/topic.asp?TOPIC_ID=1389
                        if (currentUser.EmailAddress != EmailAddress.Text)
                        {
                            FormsAuthentication.SetAuthCookie( EmailAddress.Text, true );
                        }



                        currentUser.FirstName = FirstName.Text;
                        currentUser.LastName = LastName.Text;
                        currentUser.Address1 = Address1.Text

...............then the rest of the code

Just make sure you test this code. It works for me, but may not be the best solution.

Take care,
developerz




 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query in a browser/address bar i.e. default.aspx?i takwirira ASP.NET 2.0 Basics 1 June 12th, 2008 07:58 AM
MyAccount.aspx Error coolnetboy BOOK: ASP.NET Website Programming Problem-Design-Solution 5 June 15th, 2006 05:51 AM
Problem: 'Sign Out' on "MyAccount.aspx" reidcor BOOK: ASP.NET Website Programming Problem-Design-Solution 4 April 11th, 2005 11:22 AM
Invalid cast in MyAccount.aspx carinlindberg BOOK: ASP.NET Website Programming Problem-Design-Solution 6 January 15th, 2005 11:49 PM
exiting MyAccount.aspx robert BOOK: ASP.NET Website Programming Problem-Design-Solution 2 July 17th, 2003 11:23 AM



All times are GMT -4. The time now is 04:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.