Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 April 26th, 2008, 08:16 PM
Registered User
 
Join Date: Apr 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Message

Someone please help,

I got this error message while trying to run Chpt1 code of Beginning ASP.Net 2.0.

Error 4 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. C:\Documents and Settings\User\My Documents\Visual Studio 2008\WebSites\All Chapters\End\Chapter01\Web.config 26


Ronald K. Rex
 
Old April 26th, 2008, 08:39 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You need to configure your directory as an application under IIS.

goto start --> run --> Inetmgr

Expand the local computer node, then the Web Sites folder, finally expand the Default Web Site node. Locate the folder that your application resides in, right click on it, select properties from the context menu that appears. This will open a new window. Right close to the middle portion of this window will be a button labeld 'Create', press this button, then press Apply then OK.

This should resolve your problem.

-Doug

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 
Old April 27th, 2008, 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

Or you may get this error when you open the parent folder of a web site in Visual Web Developer. For example, you open:

C:\Documents and Settings\User\My Documents\Visual Studio 2008\WebSites\All Chapters\End

as the root of the website, then press Ctrl+F5 so you end up at http://localhost/End/Chapter1

Instead, you should open

C:\Documents and Settings\User\My Documents\Visual Studio 2008\WebSites\All Chapters\End\Chapter01

as the root so you end up at http://localhost/Chapter1

Hope this helps,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old April 28th, 2008, 03:03 PM
Registered User
 
Join Date: Apr 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Imar
 Or you may get this error when you open the parent folder of a web site in Visual Web Developer. For example, you open:

C:\Documents and Settings\User\My Documents\Visual Studio 2008\WebSites\All Chapters\End

as the root of the website, then press Ctrl+F5 so you end up at http://localhost/End/Chapter1

Instead, you should open

C:\Documents and Settings\User\My Documents\Visual Studio 2008\WebSites\All Chapters\End\Chapter01

as the root so you end up at http://localhost/Chapter1

Hope this helps,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
Ronald K. Rex
 
Old April 28th, 2008, 03:16 PM
Registered User
 
Join Date: Apr 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wow. How did you know this would fix my problem. I really do appreciate your help. By the way I am fairly new to object oriented programming and the concepts involved. Do you know of any good books that would help me to better understand the concept of Object Oriented software design and why we use objects and where to use an object when you are developing your application. The book does not have to be language or platform specific if it does not matter. Sometimes while I am reading Beginning ASP 2.o I get lost because I dont really understand objects and classes.

Thanks for Your help,

Ronald K. Rex

Ronald K. Rex
 
Old April 29th, 2008, 12:00 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,

I knew that because it's a common error. Searching the Wrox archives for that error messages would have given you a number of similar solutions.

I can't recommend any good book on that topic. Maybe somebody else has a suggestion? Jim maybe?

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
Where does the error message go? Wei Wang BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 13th, 2006 02:03 PM
Error Message alannoble26 Excel VBA 4 November 25th, 2005 11:20 AM
error message. Tasha Access VBA 2 August 11th, 2004 11:07 PM
Help with Error message mariakovacs Classic ASP Databases 3 October 10th, 2003 03:59 PM





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