p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 (http://p2p.wrox.com/forumdisplay.php?f=229)
-   -   Listing 16-8 (http://p2p.wrox.com/showthread.php?t=49291)

smiller October 21st, 2006 09:29 AM

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.

smiller October 21st, 2006 11:26 AM

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

Asp.Net October 21st, 2006 08:38 PM

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 :(

jminatel October 23rd, 2006 09:26 AM

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


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;


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!

Asp.Net October 23rd, 2006 05:53 PM

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!

jminatel October 24th, 2006 08:39 AM

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!

All times are GMT -4. The time now is 12:28 PM.

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