section registered as allowDefinition=’MachineToApplication’ beyond application level

I am getting this error when I create a new folder, and upload files to it. I have an existing site that’s built, but I don’t want to add this to the site, but rather have it be an application all by itself. Any ideas?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

This is indeed the first scenario to check. However, the most frustrating scenario in which this error occurs is after a build/publish under a different build configuration (i.e. build under Release, and then trying to build under Debug and getting this error). You should perform Clean operation on the Release mode.

See this answer which points to further details: Error: allowDefinition=’MachineToApplication’ beyond application level

Method 2

I just had this problem not too long ago. Go into IIS, select the folder you created and go to properties. You will see “application name” greyed out, click the “create” button and save it. You will be able to run your separate application in it.

Method 3

I just solved such errors after hours of trying, I had the same scenario resolved by simply deleting any back up files your solution may have created moving your application from one version of visual studio to the other and the problem is resolved

Method 4

I faced this issue many times. Different solutions worked in different occasions. Following are the solutions.

  1. Create an IIS application for your web site.
  2. Clean the solution and rebuilt again.
  3. Delete the obj folder and rebuilt again.

Method 5

Open IIS click right click on the folder and Click “Convert to Application”

Method 6

well i’ve just resolved this error.
just go to your project/website folder (not the published one). search web.config in the whole folder if it found more than once, you know which to delete. otherwise if only one web.config is found. make sure its has the rights to be Read. and the final problem if everything is fine, then make a new project in visual studio and remove all the components then add existing project by right clicking it, build,debug. Voila!!!

Method 7

I had this problem when I moved my application from Window XP to Windows 7. The error is primarily because you did not convert your folder into Application.

The mistake that I was making was, when I selected the folder in IIS and right clicked, I choose “Add Application”. This should be “Convert to Application”. The resolved my problem.

You want to remove the application from your folder then do the process again and select “Convert to Application”.

Method 8

The project folder you are accessing might be the incorrect one Which result in finding two webconfig file for a project. So try to open the correct website.

Method 9

For what it’s worth, while in development, I got this same error when using “Open Website” on a project that I created using “New Project”. If I instead open with “Open Project”, the error goes away.

Method 10

I just faced this today…Here is my fix and understanding of it.

  1. Right click on your webproject and ‘unload’ it.
  2. Edit your projects .csproj file (I assume .vs.proj in vb)
  3. Look for ‘true’
  4. Change it to false.
  5. Save your .csproj
  6. Right Click on the .csproj and reload it.

Hopefully fixes your problem.

It’s my understanding that the error you are getting is ‘real’, in my case
in my web.config was causing the error, because this should actually be set on our server, not by the application.

For some reason, reading Phil Haacks post help me to figure this out…I hope this helps others, I was unable to find a solution that met our needs while looking.

Method 11

If you are getting this error in Visual Studio, Scott Michell has explained it very well.

Basically you are opening the parent folder of the site. In this case web.conf is in subfolder which does not allow certain tags and hence this error. To resolve, simply reopen the site and select the root folder. The error should disappear.

If the error is IIS related, then creating Application for the folder might help.

Method 12

  1. Open IIS
  2. Select the Application Pool
    3.Select pool where application hosted
    4.Click on “Advanced Settings”
    5.Change the “Managed Pipe Line Mode” to “Integrated”

Method 13

If your web application is running in the SharePoint hive, remember to copy your application to the correct hive (14 or 15) and server (FE or App) and then create the virtual directory in the SharePoint 80 “_layouts” subfolder.

enter image description here

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x