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 5th, 2003, 12:13 AM
Registered User
 
Join Date: Jun 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default error editing email address

If you change the email address and try and navigate to the home page, an error is thrown
 
Old July 13th, 2003, 05:18 AM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, this is a nasty one. You must delete the site's cookie to recover from this error.

To prevent the error in the future, you have to add some code to update the authcookie with the new email address when you update the email address on the MyAccount page.

The exception is thrown because the email address in the db doesn't match the email address in the authcookie. The class that does the user lookup by email address doesn't gracefully handle non-existent email addresses passed to it.

Another way to fix this is to catch this exception and delete the authcookie so the user must login again and get a new authcookie with the new email address. However, this solution is not as user friendly. However, it should be added anyway to clean up users that already have bad authcookies.

There are other nasty bugs in ThePhile code. For example, try to logout when you are on the MyAccount page.

In general, I'd have to rate the quality of "ThePhile" portal as poor. Also I don't think some of the features are well implemented -- especially the admin tools.
 
Old July 14th, 2003, 06:00 AM
Authorized User
 
Join Date: Jun 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As for changing the email address, I just reassign a new cookie in MyAccount.aspx (below in bold). You suggest to delete the cookie it, while the only way I found to do this is SignOut method (is SignOut called a method?) which is not what we want to do, obviously.

...
Un.WebModules.Accounts.Business.User currentUser =
new Un.WebModules.Accounts.Business.User(
(Un.WebModules.Accounts.Business.MonucPrincipal)Co ntext.User);

if (currentUser.EmailAddress != EmailAddress.Text)
{
FormsAuthentication.SetAuthCookie( EmailAddress.Text, true );
}
...



What do you propose for the logout when you are on the MyAccount page? I tried to search deja.com for Validation/SignOut issues but to no avail. I instead created a LogOut.aspx page, and converted the SignOut button to a HyperLink control.

Cheers,

If I find something I will let you know, cheers from the DR Congo,

Kim Gjerstad
 
Old July 22nd, 2003, 11:34 AM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After logout, I redirect to the home page or the login page.






Similar Threads
Thread Thread Starter Forum Replies Last Post
validate email address dartcoach Javascript 0 April 28th, 2008 12:58 PM
Valid Email Address...... muskaanbajaj VB.NET 1 November 22nd, 2005 11:38 AM
How to validate email address crmpicco Javascript How-To 2 February 16th, 2005 10:56 AM
Validate Email address richardtr BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 6 November 23rd, 2004 01:45 PM
Is there anyway to get my email address removed jayirvin Forum and Wrox.com Feedback 8 April 16th, 2004 09:36 AM





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