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

July 8th, 2011, 01:23 PM
|
|
Authorized User
|
|
Join Date: Jul 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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?
|
|

July 9th, 2011, 05:24 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

July 9th, 2011, 06:18 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

July 9th, 2011, 06:50 AM
|
|
Authorized User
|
|
Join Date: Jul 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
|
|

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

July 9th, 2011, 07:30 AM
|
|
Authorized User
|
|
Join Date: Jul 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
thank you so much! it worked!
|
|
 |