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?
-
1This problem still manifests in VS2012. I have opened a bug report with Microsoft. Anyone experiencing the issue please upvote the bug report https://connect.microsoft.com/VisualStudio/feedback/details/779737/error-allowdefinition-machinetoapplication-beyond-application-level – Eric J. Feb 21 '13 at 22:15
13 Answers
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
- 1
- 1
- 17,068
- 9
- 59
- 93
-
I inherited a project that has the same issue. I don't know if it happens because they have different versions of the config file per environment and it creates the web.config on the fly at compile time or what but if I change build modes I always have to do a Clean Solution in order for the build to be successful. – Nick Bork Feb 06 '14 at 16:23
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.
- 3,314
- 23
- 23
I faced this issue many times. Different solutions worked in different occasions. Following are the solutions.
- Create an IIS application for your web site.
- Clean the solution and rebuilt again.
- Delete the obj folder and rebuilt again.
- 6,308
- 4
- 28
- 32
Open IIS click right click on the folder and Click "Convert to Application"
- 278
- 1
- 3
- 16
-
In 2012 R2, I did not see this option when I right clicked. However, it did show in the Actions pane, when the offending directory was highlighted. – Nathan Hartley Feb 20 '14 at 17:01
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!!!
- 126
- 3
- 10
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".
- 16,560
- 16
- 115
- 136
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.
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.
- 2,456
- 3
- 32
- 54
I just faced this today...Here is my fix and understanding of it.
- Right click on your webproject and 'unload' it.
- Edit your projects .csproj file (I assume .vs.proj in vb)
- Look for 'true'
- Change it to false.
- Save your .csproj
- 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.
- 342
- 6
- 14
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.
- 16,560
- 16
- 115
- 136
- Open IIS
- Select the Application Pool 3.Select pool where application hosted 4.Click on "Advanced Settings" 5.Change the "Managed Pipe Line Mode" to "Integrated"
- 1
- 2
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.
- 2,005
- 2
- 21
- 24
- 1
