Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2003, 03:11 AM
Authorized User
 
Join Date: Jun 2003
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
 
Old July 11th, 2003, 07:41 AM
Friend of Wrox
 
Join Date: May 2003
Posts: 229
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
 
Old July 11th, 2003, 11:18 AM
Authorized User
 
Join Date: Jun 2003
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
 
Old July 13th, 2003, 05:23 AM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

See my post here:

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


 
Old August 31st, 2003, 09:13 PM
Authorized User
 
Join Date: Jul 2003
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


 
Old September 17th, 2003, 01:52 PM
Authorized User
 
Join Date: Jul 2003
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









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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.