配置错误:此配置部分不能在此路径中使用 [英] Config Error: This configuration section cannot be used at this path

查看:475
本文介绍了配置错误:此配置部分不能在此路径中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将站点部署到服务器时遇到错误。当我尝试加载主页,或在IIS中的新站点上访问身份验证时,我收到错误:

I've encountered an error deploying a site to a server. When trying to load the home page, or access authentication on the new site in IIS, I get the error:


配置错误:此配置部分不能在此路径中使用。
当该部分被锁定在父级别时会发生这种情况。默认情况下,锁定为
(overrideModeDefault =Deny),或者由
位置标记显式设置,overrideMode =Deny或遗留
allowOverride =false。

Config Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

更多细节可在此处找到,场景7 匹配我的十六进制错误代码。

More detail can be found here, in Scenario 7 matches my hex error code.

上面链接网站上给出的解决方案是在 applicationHost.config 文件中的错误中提到的部分中为overrideModeDefault设置允许。就我而言,在 system.webServer 中的安全下。但是,如果我在本地计算机上查看 applicationHost.config ,该网站已经正确部署,该部分设置为拒绝

The solution given on the linked site above is to set Allow for overrideModeDefault in the section mentioned in my error, in the applicationHost.config file. In my case, under Security in system.webServer. But if I look at the applicationHost.config on my local computer, where the site is properly deployed already, that section is set to Deny.

如果此解决方案正确,我的本地实例如何使用相同的 web.config 运行良好?根据我的 applicationHost.config ,该部分应该被锁定,但事实并非如此。我宁愿不更改 applicationHost.config 文件,因为该服务器上还有许多其他网站正在运行。还有其他解决方案吗?

If this solution is correct, how is my local instance running just fine with the same web.config? According to my applicationHost.config, that section should be locked, but it's not. I'd prefer to not change the applicationHost.config file, because there are many other sites running on that server. Is there another solution?

推荐答案

我遇到了同样的问题。不记得我在网上找到它的地方,但这就是我所做的:

I had the same problem. Don't remember where I found it on the web, but here is what I did:


  • 点击开始按钮

  • 在搜索框中,在功能窗口中输入打开或关闭Windows功能

  • ,点击:Internet信息服务

  • 点击:万维网服务

  • 点击:应用程序开发功能

  • 检查(启用)功能。我检查了除CGI以外的所有内容。

  • Click "Start button"
  • in the search box, enter "Turn windows features on or off"
  • in the features window, Click: "Internet Information Services"
  • Click: "World Wide Web Services"
  • Click: "Application Development Features"
  • Check (enable) the features. I checked all but CGI.

btw,我使用的是Windows 7。

btw, I'm using Windows 7.

这篇关于配置错误:此配置部分不能在此路径中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆