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

June 26th, 2009, 02:53 PM
|
|
Authorized User
|
|
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
allowDefinition='MachineToApplication'
I am working on the Try It Out on page 75 and am getting the following error: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
I am not sure what this means or how to correct it - the page appears to work properly.
Any help would be appreciated.
Cheers -
george
|
|

June 27th, 2009, 06:18 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi george,
Take a look at the last section of page 656. You're probably opening C:\BegASPNET instead of C:\BegASPNET\Site.
Hope this helps,
Imar
|
|

June 29th, 2009, 08:14 AM
|
|
Authorized User
|
|
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Imar -
Thanks for the response. It looks like I am missing something basic.
I go to File -> Open Website and select c:/BegASPNet/Site
I open Default.aspx
I press Ctrl-F5 and get the error
Did I miss a step when setting up the website? Should I be doing something in IIS to get this to work?
Cheers -
george
|
|

June 29th, 2009, 08:23 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi George,
What do you see when you open that page in the browser? htp://localhost:12345 or http://localhost:12345/Site
Also, how does your web.config look? Do you have more than one web.config in either C:\BegASPNET or C:\BegASPNET\Site? What exactly do these folders contain? Does C:\BegASPNET only contain the Site folder and no files?
IIS is not involved here; when you open a site and press Ctrl+F5, VWD spins up the built-in development web server (unless you told it otherwise).
Cheers,
Imar
|
|

June 29th, 2009, 09:17 AM
|
|
Authorized User
|
|
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Imar -
The page that is opened (after showing the error and asking if I would like to continue) is http://localhost:1964/Site/Default.aspx.
C:\BegASPNET only contains the Site folder and no files. Site contains a single web.config file and I have not changed anything within the file, so it should only contain the default information.
Should I perhaps remove the Site folder and start over? Perhaps I did something without knowing it (although things appear to have worked so far).
Cheers -
george
|
|

June 29th, 2009, 09:32 AM
|
|
Authorized User
|
|
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
I'm not sure whether or not this is an issue, but I do have websites configured under IIS under c:/Inetpub/wwwroot. Should Site have been created under wwwroot?
Cheers -
george
|
|

June 29th, 2009, 12:40 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
but I do have websites configured under IIS under c:/Inetpub/wwwroot.
|
Nope, that shouldn't matter as IIS is not involved here (again, assuming you haven't changed this).
When you've open the site in VWD, what do you see in the Solution Explorer? What files and folders do you see?
Imar
|
|

June 29th, 2009, 03:48 PM
|
|
Authorized User
|
|
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
In the Solution Explorer I see the following folders:
App_Data
Controls
Demos
MasterPages
Resources
Source
Styles
and the following files:
Default.aspx
web.config
Cheers -
george
|
|

June 29th, 2009, 03:50 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
In that case, I am stumped. It shouldn't be like this.
Can you send me a zipped version of the web project so I can take a look? Send me a message through the Contact page of my web site. I'll reply so you know my address and know where to send the file.
Cheers,
Imar
|
|

June 29th, 2009, 03:56 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Wait a minute. I see what the problem is. You have the final Source and Resources folders in your Site folder as well:
App_Data
Controls
Demos
MasterPages
Resources
Source
Styles
It shouldn't be like that, but like this instead:
Code:
C:\
BegASPNET
Site
App_Data
Controls
... etc
Source
...
Resources
...
That is, Source and Resources should be at the same level as Site, not inside Site. Refer to the Introduction of the book for instructions about this structure.
Cheers,
Imar
Last edited by Imar; June 29th, 2009 at 03:57 PM..
Reason: Wrapped code around the folder list to maintain spacing
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|
 |