简体   繁体   English

在应用程序级别之外注册为allowDefinition ='MachineToApplication'的部分

[英]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). 但是,发生此错误的最令人沮丧的情况是在不同的构建配置下构建/发布之后(即在Release下构建,然后尝试在Debug下构建并获得此错误)。 You should perform Clean operation on the Release mode. 您应该在释放模式下执行清洁操作。

See this answer which points to further details: Error: allowDefinition='MachineToApplication' beyond application level 请参阅此答案,该答案指出更多详细信息: 错误:allowDefinition ='MachineToApplication'超出应用程序级别

I just had this problem not too long ago. 我不久前就遇到过这个问题。 Go into IIS, select the folder you created and go to properties. 进入IIS,选择您创建的文件夹并转到属性。 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. 为您的网站创建一个IIS应用程序。
  2. Clean the solution and rebuilt again. 清洁解决方案并重新重建。
  3. Delete the obj folder and rebuilt again. 删除obj文件夹并重新重建。

打开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. 当我将应用程序从Window XP移动到Windows 7时,我遇到了这个问题。错误主要是因为您没有将文件夹转换为Application。

The mistake that I was making was, when I selected the folder in IIS and right clicked, I choose "Add Application". 我犯的错误是,当我在IIS中选择文件夹并右键单击时,我选择“添加应用程序”。 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. 您正在访问的项目文件夹可能不正确,导致找到项目的两个webconfig文件。 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. 右键单击您的webproject并“卸载”它。
  2. Edit your projects .csproj file (I assume .vs.proj in vb) 编辑你的项目.csproj文件(我假设vb中的.vs.proj)
  3. Look for 'true' 寻找'真实'
  4. Change it to false. 将其更改为false。
  5. Save your .csproj 保存你的.csproj
  6. Right Click on the .csproj and reload it. 右键单击.csproj并重新加载它。

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. 我的理解是你得到的错误是“真实的”,在我的web.config中导致错误,因为这实际上应该在我们的服务器上设置,而不是由应用程序设置。

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. 出于某种原因,阅读Phil Haacks帖子可以帮助我解决这个问题......我希望这有助于其他人,我无法找到满足我们需求的解决方案。

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. 如果多次找到,请在整个文件夹中搜索web.config,您知道要删除哪个。 otherwise if only one web.config is found. 否则,如果只找到一个web.config。 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. 如果一切都很好,最后的问题,然后在visual studio中创建一个新项目并删除所有组件,然后通过右键单击,构建,调试添加现有项目。 Voila!!! 瞧!

If you are getting this error in Visual Studio, Scott Michell has explained it very well. 如果您在Visual Studio中收到此错误, Scott Michell已经很好地解释了它。

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. 在这种情况下,web.conf位于子文件夹中,它不允许某些标记,因此会出现此错误。 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. 如果错误与IIS相关,则为该文件夹创建Application可能会有所帮助。

  1. Open IIS 打开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" 选择应用程序池3.选择应用程序托管的池4.单击“高级设置”5.将“管道管道模式”更改为“集成”

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. 如果您的Web应用程序在SharePoint配置单元中运行,请记住将应用程序复制到正确的配置单元(14或15)和服务器(FE或App),然后在SharePoint 80“_layouts”子文件夹中创建虚拟目录。

在此输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在应用程序级别之外使用注册为allowDefinition ='MachineToApplication'的节是错误的 - It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level 错误:使用注册为 allowDefinition='MachineToApplication' 的部分超出应用程序级别是错误的 - Error: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level 在应用程序级别之外注册为allowDefinition ='MachineToApplication' - registered as allowDefinition='MachineToApplication' beyond application level 配置错误:在应用程序级别之外使用注册为allowDefinition ='MachineToApplication'的部分是错误的 - Configuration error: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level 问题-allowDefinition = MachineToApplication超出应用程序级别 - Issue - allowDefinition = MachineToApplication beyond application level 在Web主机上部署网站时出现“ ..allowDefinition ='MachineToApplication'超出应用程序级别”错误 - “..allowDefinition='MachineToApplication' beyond application level” error on deploying the website on web host 超出应用程序级别的简单成员免除allowDefinition ='MachineToApplication' - simple member ship provoider allowDefinition='MachineToApplication' beyond application level 错误allowDefinition ='MachineToApplication'在ASP.NET中超出应用程序级别 - Error allowDefinition='MachineToApplication' beyond application level in asp.net MachineToApplication超出应用程序级别 - 此错误意味着什么? - MachineToApplication beyond application level - What does this error means? ASP .NET:allowDefinition ='MachineToApplication' - ASP .NET : allowDefinition='MachineToApplication'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM