Wrox Programmer Forums
|
BOOK: Professional ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4.5 in C# and VB by Jason N. Gaylord, Christian Wenz, Pranav Rastogi, Todd Miranda, Scott Hanselman; ISBN: 978-1-1183-1182-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4.5 : in C# and VB 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 April 22nd, 2014, 02:24 PM
Authorized User
 
Join Date: Mar 2011
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Default Personalization - Profile not recognized

I'm on the bottom of page 674

I'm trying to add the C# line: Profile.FirstName = TextBox1.Text
But it does not recognize the word "Profile". I've also tried the lowercase "profile".

I have added this to my web.config as the book shows.

<profile>
<properties>
<add name="FirstName"/>
<add name="LastName"/>
<add name="LastVisited"/>
<add name="Age"/>
<add name="Member"/>
</properties>
</profile>

Intellisense only shows me "ProfileParameter" and "ProfileServiceManager"

I've also tried compiling first, but no luck.
 
Old April 28th, 2014, 06:49 PM
Authorized User
 
Join Date: Mar 2011
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Default Needs to be a Web Site project

I found out you need to make this a Web Site project, not a regular web application project, in order for this to work.

I'm still having problems with this code though. It's telling me Page.User.Identity.IsAuthenticated is false, so I cannot enter the bit of code that assigns Profile.FirstName, etc.

If I remove the check for IsAuthenticated, I get the error message "The profile default provider was not found."





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i disable Personalization and Webpart at this website ? lastphoenix BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 January 18th, 2010 12:24 AM
Saving personalization properties w/CreateUser k8277 ASP.NET 2.0 Basics 0 April 5th, 2007 01:47 PM
alternative to multi sessions - personalization? a3321889495 BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 27th, 2006 05:12 AM
Page.Unload Personalization Saving wewald BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 3 January 17th, 2006 10:38 AM
Personalization Providers AGS BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 December 3rd, 2005 08:44 AM





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