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 June 26th, 2009, 02:53 PM
Authorized User
 
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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
 
Old June 27th, 2009, 06:18 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
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 June 29th, 2009, 08:14 AM
Authorized User
 
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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
 
Old June 29th, 2009, 08:23 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
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 June 29th, 2009, 09:17 AM
Authorized User
 
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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
 
Old June 29th, 2009, 09:32 AM
Authorized User
 
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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
 
Old June 29th, 2009, 12:40 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
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 June 29th, 2009, 03:48 PM
Authorized User
 
Join Date: Jul 2005
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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
 
Old June 29th, 2009, 03:50 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
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 June 29th, 2009, 03:56 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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

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:
GLSmyth (June 29th, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
CH3 allowDefinition='MachineToApplication' jtavenner BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 May 2nd, 2008 07:57 AM
ERROR allowDefinition='MachineToApplication' adamcherochak ASP.NET 2.0 Basics 6 September 7th, 2007 05:43 PM
allowDefinition='MachineToApplication' Error gp2p BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 May 19th, 2007 08:01 PM
problem with allowDefinition='MachineToApplication juliaw .NET Framework 2.0 2 June 12th, 2006 10:44 AM
allowDefinition='MachineToApplication' tripathi.vipul ASP.NET 1.0 and 1.1 Basics 0 May 13th, 2006 06:11 AM





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