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 September 10th, 2010, 12:43 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Chapter 18 Deploying locally

I am having trouble at Try it out 'Configuring the file system' on page 656 step 10. It says my site should work now, unfortunately it doesn't. When I first try to browse to:

http://locahost/

the browser redirects to:

http://localhost/Errors/Error500.asp...=/Default.aspx

and the Runtime Error description says 'The current custom error settings for this application prevent the details of the application error from being viewed.' The first thing I do is set the mode="Off" in this line of the web.config file:

<customErrors mode="On" defaultRedirect="mycustompage.htm"/>

Then I get a configuration error:

'Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive'
in this line in the web.config file:
<compilation debug="false" targetFramework="4.0">

After trying a different case then discovering targetFramework is not an option in the intellisense menu I remove it which gives me this:

'Could not load file or assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.'

on this line:<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>This is where I copy the web.config from the Source/Final folder thinking there may be an issue with myn. I get the same result.

Im a bit confused, what have I done wrong. The pages inside my begASPNET/Site dir inside VS 2010 work perfectly.

TYIA for your help

__________________
Wind is your friend
Matt
 
Old September 10th, 2010, 03:08 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
It says my site should work now, unfortunately it doesn't.
It should, if you had created a 3.5 site from the beginning, but judging from your description, you've created a 4.0 site instead. Two quick ways to fix that:

1. Simply run the site as a 4.0 site under IIS by choosing that as the target framework. For all practical purposes, you *have* a 4.0 site, even though you only used 3.5 options.

2. Downgrade the site and fix and remaining problems. In Visual Studio, open the site's Property Pages and on the build tab change the target framework to 3.5. This changes the web.config by changing assembly references and the target framework.

Hope this helps,

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:
mat41 (September 13th, 2010)
 
Old September 13th, 2010, 05:46 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

HI Imar - Thank you for your reply. I have been away for a few days completeting a course to compliment my learning in your book....

Gee I wonder how I ended up building this for 4.0 - I dont remember an option that asked me this. I guess it was beause I am using VS 2010, is this the default behaviour which needs to be changed to 3.5

Thanking you
__________________
Wind is your friend
Matt
 
Old September 14th, 2010, 02:09 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

There's a target drop-down in the File | New Web Site and File | New Project dialogs. For Visual Studio 2010, it defaults to .NET 4, but you can manually set it to 3.5, 3.0 and 2.0.

For Visual Studio 2008, the default was .NET 3.5 but you could also set it to 3.0 and 2.0 (but not to 4.0 as frameworks are not forwards compatible).

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 18: Deploying the Web Site ASPNETBeginner BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 September 6th, 2010 06:08 AM
Chapter 18 rock1233 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 November 14th, 2009 03:35 PM
Ch 18 Deploying Your Web Site jtruffa BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 August 24th, 2009 07:29 AM
Chapter 18 - Struts rollopa JSP Basics 0 September 14th, 2003 03:23 PM





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