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 April 24th, 2011, 05:48 PM
Authorized User
 
Join Date: May 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Error

Hello,

I'm on Chapter 17 page 649, and working on the Try it Out 'Working with Other User's Profiles', but when I request the Default.aspx from the PhotoAlbums folder I get this error message:

'The type or namespace name 'Generics' does not exist in the namespace 'System.Collections' (are you missing an assembly reference?)'

I don't know how to correct this, any ideas please, help much appreciated.

Thanks

Paul
 
Old April 25th, 2011, 09:59 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,

I think you made a mistake in setting up the property in web.config. Can you post the code for that file?

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!
 
Old April 25th, 2011, 10:47 AM
Authorized User
 
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default

The answer is in your question itself... You given the namespace as "System.Collections.Generics" but it actually is "System.Collections.Generic". Check it out...
__________________
Thanks in advance.

Regards,

Senthil Kumar M.
 
Old April 25th, 2011, 10:48 AM
Authorized User
 
Join Date: May 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Code in web.config

Hi Imar,

Here's the code in the web.config file

Code:
<?xmlversion="1.0"encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<addname="PlanetWroxConnectionString1"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PlanetWrox.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient" />
<addname="PlanetWroxEntities"connectionString="metadata=res://*/App_Code.PlanetWrox.csdl|res://*/App_Code.PlanetWrox.ssdl|res://*/App_Code.PlanetWrox.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PlanetWrox.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;"providerName="System.Data.EntityClient" />
</connectionStrings>
<system.web>
<profile>
<properties>
<addname="FirstName" />
<addname="LastName" />
<addname="DateOfBirth"type="System.DateTime" />
<addname="Bio" />
<addname="FavouriteGenres"type="System.Collections.Generics.List`1[System.Int32]" />
</properties>
</profile>
<membership>
<providers>
<clear />
<addname="AspNetSqlMembershipProvider"type="System.Web.Security.SqlMembershipProvider, System.Web, &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; 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>
<roleManagerenabled="true" />
<authenticationmode="Forms" />
<pagestheme="Management">
<controls>
<addtagPrefix="Wrox"tagName="Banner"src="~/Controls/Banner.ascx" />
</controls>
</pages>
<compilationdebug="false"targetFramework="4.0">
<assemblies>
<addassembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<addassembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<addassembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
<buildProviders>
<addextension=".edmx"type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
</buildProviders>
</compilation>
</system.web>
<system.net>
<mailSettings>
<smtpdeliveryMethod="Network"from="Paul Hudson &lt;[email protected]&gt;">
<networkenableSsl="true"userName="[email protected]"password="BobbyFischer2011$"host="smtp.gmail.com" />
</smtp>
</mailSettings>
</system.net>
<locationpath="Management">
<system.web>
<authorization>
<allowroles="Managers" />
<denyusers="*" />
</authorization>
</system.web>
</location>
<locationpath="My Profile.aspx">
<system.web>
<authorization>
<denyusers="?" />
</authorization>
</system.web>
</location>
<location>
<system.web>
<authorization>
<denyusers="?" />
</authorization>
</system.web>
</location>
<locationpath="NewPhotAlbum.aspx">
<system.web>
<authorization>
<denyusers="?"/>
</authorization>
</system.web>
</location>
</configuration>
Thanks


Paul
 
Old April 25th, 2011, 10:51 AM
Authorized User
 
Join Date: May 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Generics to Generic - Solved!

Thanks for your help, Imar and WhiteRainbow!

Solved it now, thank you


Paul





Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP error 500: Internal Server Error in Load Testing sherin Visual Studio 2008 0 May 19th, 2010 09:02 AM
Getting error XML Parsing Error: junk after document element anarleti XSLT 10 March 17th, 2010 08:43 AM
Remote Connection Error: Named Pipes Provider error hbansal ASP.NET 2.0 Basics 5 April 12th, 2009 09:51 AM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM





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