Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 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 October 21st, 2006, 09:29 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listing 16-8

Well as usual from this stupid book this example just does not work.
Forget the fact that you have to completely figure out on your own how to set up Membership, Personalization and Roles (Nobody uses SQL Express).
This example will not put the personalization attributes in the Database because when you get into the CreatedUser event, yes the user is created, but you aren't authenticated yet. Identity.Name is "" and Identity.Authenticated is false.
So how can it attach personalization info yet.
This book has been like this the whole way. Why bother to write it. I could read a magazine if I just wanted general information and not be shown examples that work. WROX has gone way down down down hill as far as I'm concerned. I don't know if I'll ever buy another book from them. I just want concrete examples that work.

  #2 (permalink)  
Old October 21st, 2006, 11:26 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is what the code should be:

Dim Prof As ProfileCommon = Profile.GetProfile(Me.CreateUserWizard1.UserName)
        Prof.FirstName = FirstName.Text
        Prof.LastName = Lastname.Text
        Prof.Age = Age.Text
        Prof.Save()

  #3 (permalink)  
Old October 21st, 2006, 08:38 PM
Authorized User
Points: 176, Level: 3
Points: 176, Level: 3 Points: 176, Level: 3 Points: 176, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I completely agree with you!
I have paid 150 dollars$$$$ for the WroxBox full of mistakes?
Sometimes it takes me a few days to figure out what the problem is?
And then I start feel my self like a big stupid fool, which has purchased a headache for 150$ I just can't belive it :(
How these people make such mistakes? I don't understand?
I like the book very mutch, and there's Errata avaliable, But! Guys you must check all of the Exercises before book gets public!.
I don't want to become a victim of somebody's mistakes :(
  #4 (permalink)  
Old October 23rd, 2006, 09:26 AM
jminatel's Avatar
Wrox Staff
Points: 18,940, Level: 59
Points: 18,940, Level: 59 Points: 18,940, Level: 59 Points: 18,940, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,945
Thanks: 73
Thanked 139 Times in 101 Posts
Default

smiller and ASP.NET:
I apologize for the mistakes in listing 16-8 and that they aren't listed on the errata page. Their omission from the errata page is my fault. Bill submitted this correction to me months ago, I've got it marked in my copy of the book, I just must have forgotten to get it posted on the page. I have submitted Bill's version of the correction as an errata and it will get posted. (His version of the fix is slightly different than yours). I'm also posting it here at the end of the message.

I would also like to say though, that while any error in a book is too many, I've yet to see the perfect error-free computer book from any publisher. I don't know of any major publisher that goes to greater lengths to give their readers the opportunity to publicly point out errors than we do here with these forums at Wrox.com or takes greater effort in posting errata when they are pointed out. We're also working to make the books better, but I also hope you can give us a little credit for the effort after the fact.

ASP.NET, I don't see that you've posted errata about any of the other 3 books in the box. Hopefully you are happier with them. As far as I know, they are fairly error free and what few errata that exist are on the errata pages for each. I like your site by the way!

Anyway, here's the corrections for 16-8:
chapter 16, page 593 code listing 16-8, VB code, lines 5-7 of code:
        Profile.FirstName = Firstname.Text
        Profile.LastName = Lastname.Text
        Profile.Age = Age.Text

should be:
        Dim pc As ProfileCommon = New ProfileCommon()
        pc.Initialize(CreateUserWizard1.UserName.ToString( ), True)

        pc.FirstName = Firstname.Text
        pc.LastName = Lastname.Text
        pc.Age = Age.Text

        pc.Save()

chapter 16, page 594 code listing 16-8, C# code, lines 5-7 of code:
        Profile.FirstName = Firstname.Text;
        Profile.LastName = Lastname.Text;
        Profile.Age = Age.Text;

should be:
        ProfileCommon pc = new ProfileCommon();
        pc.Initialize(CreateUserWizard1.UserName.ToString( ), true);

        pc.FirstName = Firstname.Text;
        pc.LastName = Lastname.Text;
        pc.Age = Age.Text;

        pc.Save();

page 594: first paragraph following the code, replace the first sentence with:
With this change to the standard registration process as is defined by a default instance of the CreateUserWizard control, your registration system now includes the request for properties stored and retrieved using the ProfileCommon object. Then, using the ProfileCommon.Initialize() method, you initialize the property values for the current user. Next, you set the property values using the strongly typed access to the profile properties available via the ProfileCommon object. After all the values have been set, you use the Save() method to finalize the process.

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!
  #5 (permalink)  
Old October 23rd, 2006, 05:53 PM
Authorized User
Points: 176, Level: 3
Points: 176, Level: 3 Points: 176, Level: 3 Points: 176, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Jim. I'm really don't want to be a mad man:) don't get me wrong!
Yes Jim, there's no errors in the other books in the wroxbox. I'm happy with them.
Well, from the other point of view, Proffesional ASP.NET 2.0 it's not that Bad.
Yes there's allways a place for mistakes, here and there, but I can say for sure: This book really changed my life.I discovered things that I couldn't imagine before.
 Yesterday I ordered a new wroxbox! Can't wait to start read it:)
Thanks for the Site!

  #6 (permalink)  
Old October 24th, 2006, 08:39 AM
jminatel's Avatar
Wrox Staff
Points: 18,940, Level: 59
Points: 18,940, Level: 59 Points: 18,940, Level: 59 Points: 18,940, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,945
Thanks: 73
Thanked 139 Times in 101 Posts
Default

ASP.NET: You just made my morning. Thanks!

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!
 


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
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 12:11 PM
Listing 8-10 and Listing 8-16. Asp.Net BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 February 6th, 2008 01:11 PM
Listing 11-6 Asp.Net BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 November 6th, 2006 03:15 PM
Listing 12-1 topm BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 March 3rd, 2006 10:53 AM



All times are GMT -4. The time now is 09:59 AM.


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