Wrox Programmer Forums
|
BOOK: Beginning ASP.NET Web Pages with WebMatrix
This is the forum to discuss the Wrox book Beginning ASP.NET Web Pages with WebMatrix by Mike Brind, Imar Spaanjaars ; ISBN: 978-1-1180-5048-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET Web Pages with WebMatrix 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 August 31st, 2012, 06:00 PM
Registered User
 
Join Date: Jul 2012
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Default Create an account

I'm having a problem in creating an account. When I clicked the button register. I'm getting this error.


The column name is not valid. [ Node name (if any) = ,Column name = Email ]
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlServerCe.SqlCeException: The column name is not valid. [ Node name (if any) = ,Column name = Email ]

Source Error:


Line 37: var user = new {FirstName = firstname, LastName = lastname, Email = email};
Line 38: try{
Line 39: var token = WebSecurity.CreateUserAndAccount(username, password, user, true);
Line 40: var hostUrl = Request.Url.GetComponents(UriComponents.SchemeAndS erver, UriFormat.Unescaped);
Line 41: var confirmationUrl = hostUrl + VirtualPathUtility.ToAbsolute("~/Account/Confirm?confirmationCode=" + HttpUtility.UrlEncode(token));


Source File: c:\BegASPNET\Site\Classifieds\Account\Register.csh tml Line: 39



Pls. help me guys. I'm getting an error in line 39.

Last edited by chefs_corner; August 31st, 2012 at 08:15 PM..
 
Old September 3rd, 2012, 08:40 AM
Wrox Author
 
Join Date: Dec 2011
Posts: 57
Thanks: 1
Thanked 19 Times in 19 Posts
Default

There's a typo on page 310 where it specifies that the column name should be "E-mail". That should read "Email". The easiest thing to do is to drop the column named "E-mail" and add another called "Email"

Last edited by Mike Brind; September 3rd, 2012 at 05:19 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 15 -create user account melania BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 December 5th, 2008 05:53 PM
Where is my IUSR Account? rit01 Classic ASP Basics 1 December 4th, 2005 05:20 PM
Create User Account casselj ASP.NET 1.0 and 1.1 Professional 1 June 20th, 2005 08:34 AM
MSDE, how create database, user account ??? majidnakit All Other Wrox Books 1 January 7th, 2005 03:12 AM





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