Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Dear all in code project:

hi every body
In fact, i have very big problem scince many days
and i hope that you can help me
I make web site in ASP.net with C# and my server is my local computer
When i make run to the project in Visual Studio 2005 that error appears with this massage:

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.

It tell me that the error found in configuration file at that line:

<authentication mode="Windows">

Please note that I make setup for iis before i setup Visual Studio 2005
I have windows xp

Please help me...
Thank for all
Posted
Updated 17-Jan-20 3:57am
v3
Comments
Sandeep Mewara 6-Sep-10 2:31am    
Instead of using 'Add Comment' feature you used answer button to talk to me. I didn't got any notification and was totally unaware.

You should always use 'Add Comment' feature to respond to an answer. Hope you got this with an example here.

If you have multiple configuration files (web.config) causes that error . Having multiple web.config even in separate directoriyes means you want "multiple" applications in which case you need to make them "virtual directory" in IIS or in hosting if you want your app online
 
Share this answer
 
I think this is what you need to look at :

http://forums.asp.net/p/769696/769696.aspx[^]

Basically you can only put few settings that are allowed in sub folders like appsettings, authorization, etc. Please remove unnecessary web.config entries from all the web.config.
 
Share this answer
 
Comments
Sandeep Mewara 6-Sep-10 2:30am    
Comment from OP:
Thank you very much Mr.Abhishek
It is exactly what i want and it is solved my problem

thanks.
Do you have multiple Web.Config file in your root folder? Generally that is the cause of this error.
 
Share this answer
 
Comments
Abhishek Sur 5-Sep-10 18:50pm    
thanks for your answer

yes i have multiple Web.Config file but other Web.Config file in subfolder and the root folder have only one Web.Config file.

Please any one can help me please
????????????????????????????????????????
Member 10194492 4-Feb-14 3:47am    
hugy
emy_math 6-Aug-18 2:43am    
thanks
Its caused by references in my case.Just remove your reference from a solution explorer which is on different location which you have added recently.If u want to add that reference in your website just copy it paste in project solution explorer than add it by using add references
 
Share this answer
 
Comments
Vincent Maverick Durano 3-Aug-18 12:07pm    
This thread has been answered many years ago. Adding your solution to old and resolved threads like this is considered to be thread-jacking. Replying to very old threads (aka Necro-Posting) is discouraged on the forums as it moves those old threads ahead of the sites more recent threads.

Most of the people asking questions today very much do care what's recent. They are looking for help now. Most answerers look at the recent activity listings to see who needs help. If current questions are pushed down the list because old threads (many of which have been resolved) are reactivated, it makes it more difficult for new questions to be noticed.

While this site acts a a very useful reference tool, that's not its primary purpose. It's to provide help to people who need it now.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900