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

March 27th, 2012, 07:01 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 27th, 2012, 10:17 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Can you post the code for that page?
Imar
|
|

March 27th, 2012, 11:04 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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>
|
|

March 27th, 2012, 11:17 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Very odd, as this code looks OK to me.
Could there be an issue in web.config? Did you recently change something?
Imar
|
|

March 27th, 2012, 11:22 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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>
|
|

March 27th, 2012, 11:38 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

March 27th, 2012, 11:51 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
Ahhh thank you! Ill have a look and change that now.
Thanks again for the help Imar,
Nick
|
|
 |
|