Wrox Programmer Forums
|
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 15th, 2011, 12:26 PM
Registered User
 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 13 p446 No context objects listed

It says

In the Data Source Configuration Wizard dialog box, ensure that the PlanetWroxDataContext class is selected and click Next...

There are no data contexts shown; the list is empty. Everything in the chapter has worked up to this point. What could be the problem?

I'm using VWD 2010 Express.
 
Old July 15th, 2011, 12:41 PM
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,


Does you site have any compilation errors? To check, right-click the project in the Solution Explorer and choose Build or Rebuild. Then check the Errors List and if it's empty, try the wizard again.


Also, try restarting Visual Studio / VDW.


Finally, did you place the model in the correct folder? Can you see the dbml in the App_Code folder and does it have a "code behind" file?


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 15th, 2011, 02:47 PM
Registered User
 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Yes I do get a compile error

Yes the dbml is in App_Code and has its code-behind.

The first compile error says

The type or namespace name 'Linq' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) C:\BegASPNET\Site\App_Code\PlanetWrox.designer.cs

The web.config contains:

Code:
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
As an aside there is no 'Version=3.5.x' version of that line.

Also, when I added Picture and PhotoAlbum on page 445 it asked me if I wanted to set myself up as owner, which I had already done in a previous example (in chapter 12 I think).

And, the Linq examples up to this point work fine.
 
Old July 15th, 2011, 03:38 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Are you doing this in VS 2010 with .NET 4?

You could try resetting the framework bindings, like this:

1. Right-click the project and choose Property Pages
2. On the Build Tab, switch to .NET 4 if the curent version is 3.5, or the other way around
3. Click OK to apply the changes
4. Try again
5. If it still doesn't work, follow step 1-3 again, and switch to the other framework.

All of this should work under 3.5 and 4.0

If it keeps failing, send me a zipped copy of the site and I'll have a look...

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:
Thomas Kennedy (July 15th, 2011)
 
Old July 15th, 2011, 04:12 PM
Registered User
 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Yes that worked

I switched it to 3.5, rebuilt, that didn't help, I closed it and had some tea, then switched it back 4.0 and it works.
 
Old July 15th, 2011, 04:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Tea is always the magic answer when programming.....;-)

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 13: context object problem dany96 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 6 July 9th, 2011 07:30 AM
Chapter 5. Context... shogi BOOK: Silverlight 4 Problem - Design - Solution 0 August 10th, 2010 03:36 PM
Chapter 13 - Forms as objects Zave BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 0 August 22nd, 2007 12:23 AM
Shared Context example from Chapter 11 cebartling BOOK: Professional Java Development with the Spring Framework 0 May 20th, 2006 03:28 PM





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