Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 8th, 2011, 02: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?
Reply With Quote
  #2 (permalink)  
Old July 9th, 2011, 06:24 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 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!
Reply With Quote
  #3 (permalink)  
Old July 9th, 2011, 06: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
Reply With Quote
  #4 (permalink)  
Old July 9th, 2011, 07:18 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 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!
Reply With Quote
  #5 (permalink)  
Old July 9th, 2011, 07: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
Reply With Quote
  #6 (permalink)  
Old July 9th, 2011, 08:12 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
dany96 (July 9th, 2011)
  #7 (permalink)  
Old July 9th, 2011, 08: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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 07: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 07: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 02: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 03:31 AM



All times are GMT -4. The time now is 05:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.