Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 July 8th, 2011, 01:23 PM
Authorized User
Points: 45, Level: 1
Points: 45, Level: 1 Points: 45, Level: 1 Points: 45, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default chapter 13: context object problem

hi.
in ch13 when i create the planetWrox.dbml and use the planetWroxDataContext in the dataSource it works fine in the first time, but after i restart webdeveloper and try to configurate the data source I get this message when I try using planetWroxDataContext:
HTML Code:
if the type 'PlanetWroxDataContext' located in app_code folder, please check that it compiles. If the type is located in a compiled assembly, please check that the assembly is referenced by the project.
what is the problem and how do i fix it?
 
Old July 9th, 2011, 05:24 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Is that the complete error message? Also, do you see error messages in the Error List when you build the web site? And did you create a Web Site (File | New Web Site) or a Web Application (File | New Project)?

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 July 9th, 2011, 05:44 AM
Authorized User
Points: 45, Level: 1
Points: 45, Level: 1 Points: 45, Level: 1 Points: 45, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

yes it's the complete error message, but also when I press F5 to start debugging it throws me this error in the error list:
HTML Code:
Error	1	The type or namespace name 'Linq' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)	C: - *my physical folder* - \App_Code\PlanetWrox.designer.cs	16	19	C:\...\Site\
but the site works fine when i open in browser.
I pretty sure I did a new website and not project..
but in your site there is no problem like that (source/chapter 13) so I guess I did something wrong but I don't know what it is..

here is a screenshot if it helps:
http://img194.imageshack.us/img194/4803/errorrm.jpg
 
Old July 9th, 2011, 06:18 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hmmm, weird indeed. Can you post the code for the web.config file. Or better yet, send me a zipped copy of the entire site so I can take a look?

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 July 9th, 2011, 06:50 AM
Authorized User
Points: 45, Level: 1
Points: 45, Level: 1 Points: 45, Level: 1 Points: 45, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

here:
http://www.megaupload.com/?d=6SSLSOQZ
 
Old July 9th, 2011, 07:12 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Your site seems to be a mix of ASP.NET 3.5 and ASP.NET 4. Here's how to fix the issue.

1. Right-click the project in the Solution Explorer and choose Property Pages

2. In the Build category, set Target Framework to .NET Framework 4

3. Click OK

The errors should then all be gone. When you click OK, VWD fixes the settings (such as assembly references) in the web.config file.

Optionally, you can repeat these steps and switch back to .NET 3.5 if that's what you want / require.

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:
dany96 (July 9th, 2011)
 
Old July 9th, 2011, 07:30 AM
Authorized User
Points: 45, Level: 1
Points: 45, Level: 1 Points: 45, Level: 1 Points: 45, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

thank you so much! it worked!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 13 pg448: Object reference not set to an instance of an object tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 August 8th, 2009 06:14 AM
Chapter 13: shopping cart problem mysecondlove BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 April 9th, 2008 06:48 PM
Chapter 13 problem(undefined index) linux-penguin BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 February 15th, 2008 06:10 AM
Chapter 13 - Problem compiling Cart Dsypher BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 March 12th, 2007 01:34 AM
problem in chapter 13 derrida BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 July 28th, 2006 02:31 AM





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