简体   繁体   中英

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?

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 (ie 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

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.

我只是在经过几个小时的尝试后解决了这些错误,我通过简单地删除你的解决方案可能创建的任何备份文件解决了相同的场景,将你的应用程序从一个版本的visual studio移动到另一个版本并解决了问题

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.

打开IIS单击右键单击该文件夹,然后单击“转换为应用程序”

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".

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.

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.

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

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.

  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"

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.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM