Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : 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 March 27th, 2012, 07:01 AM
Authorized User
 
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
Default Problem page 636.

Hi, ive just tried to open my Login.aspx page and received this weird error:

Code:
Compilation Error 
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS1010: Newline in constant

Source Error:

[No relevant source lines]
Dont know what it could mean, any help would be appreciated!

Nick
 
Old March 27th, 2012, 10:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you post the code for that page?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 27th, 2012, 11:04 AM
Authorized User
 
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
Default

Hi Imar, yes here it is. There wasnt any code for it just markup:

One other thing that might be of interest is that i tried to open the securty tab in WSAT and got the same error.

Code:
<%@ Page Title="Log in to Planet Wrox" Language="C#" MasterPageFile="~/MasterPages/Frontend.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="Server">
    <h1>Log in to Planet Wrox<asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
            <asp:Login ID="Login1" runat="server" 
          CreateUserText="Sign Up for a New Account at Planet Wrox" 
          CreateUserUrl="SignUp.aspx" Font-Bold="True" Font-Names="Arial" 
            Font-Size="Small" Width="250px">
            </asp:Login>
            <br />
            <br />
            <asp:PasswordRecovery ID="PasswordRecovery1" runat="server">
            <MailDefinition subject="Your new Password for PlanetWrox.com"></MailDefinition>
            </asp:PasswordRecovery>
        </AnonymousTemplate>
        <LoggedInTemplate>
            You are already logged in
        </LoggedInTemplate>
        </asp:LoginView>
    </h1>
    <asp:LoginStatus ID="LoginStatus1" runat="server" />
</asp:Content>
 
Old March 27th, 2012, 11:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Very odd, as this code looks OK to me.

Could there be an issue in web.config? Did you recently change something?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 27th, 2012, 11:22 AM
Authorized User
 
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
Default

Today ive been adding this code to my web.config file so unless theres a problem with some of this :

Code:
        <profile>
            <properties>
                <add name ="FirstName" />
                <add name ="LastName" />
                <add name ="DateOfBirth" type="System.DateTime" />
                <add name ="Bio" />
                <add name ="FavoriteGenres" 
                                type="System.Collections.Generic.List'1[System.Int32]"/>
            </properties>
        </profile>
        <membership>
            <providers>
                <clear /><add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
            </providers>
        </membership>
 
Old March 27th, 2012, 11:38 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Ah, there we have it. Take a look at this:

Quote:
type="System.Collections.Generic.List'1[System.Int32]"/>
You're using a quote (') instead of the back tick (`).

Take a look at page 623 / 624 for more details.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Nick Makin (March 27th, 2012)
 
Old March 27th, 2012, 11:51 AM
Authorized User
 
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
Default

Ahhh thank you! Ill have a look and change that now.

Thanks again for the help Imar,

Nick





Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 2 - page 41 problem creating the page.. jorjiana BOOK: Beginning Oracle Application Express ISBN: 9780470388372 2 August 22nd, 2009 04:25 AM
problem in master page bond007 ASP.NET 2.0 Basics 1 April 23rd, 2009 12:32 PM
problem about page display bbqlee Access 1 July 16th, 2006 02:06 AM
Ch. 18, page 636 Vera BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 0 March 18th, 2005 06:09 PM
Problem In refreshing a page. zaeem Classic ASP Components 2 November 4th, 2003 12:42 AM





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