Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
535 views
in Technique[技术] by (71.8m points)

iis - 配置错误:无法在此路径上使用此配置部分(Config Error: This configuration section cannot be used at this path)

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:

(尝试加载主页或访问IIS中新站点上的身份验证时,出现错误:)

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

(锁定默认情况下是(overrideModeDefault =“ Deny”),或者是由一个带有overlayMode =“ Deny”或旧版allowOverride =“ false”的位置标记显式设置的。)

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

(在方案7中匹配我的十六进制错误代码,可以在这里找到更多详细信息。)

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.

(上面的链接站点上给出的解决方案是在我的错误中提到的部分中,在applicationHost.config文件中设置Allow for overlayModeDefault。)

In my case, under Security in system.webServer .

(就我而言,位于system.webServer中的 Security下。)

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 .

(但是,如果我查看本地计算机上已经正确部署了站点的applicationHost.config ,则该部分设置为Deny 。)

If this solution is correct, how is my local instance running just fine with the same web.config ?

(如果此解决方案正确,那么我的本地实例如何在相同的web.config下正常运行?)

According to my applicationHost.config , that section should be locked, but it's not.

(根据我的applicationHost.config ,该部分应被锁定,但不是。)

I'd prefer to not change the applicationHost.config file, because there are many other sites running on that server.

(我希望不要更改applicationHost.config文件,因为该服务器上还有许多其他站点正在运行。)

Is there another solution?

(还有其他解决方案吗?)

  ask by Alex translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had the same problem.

(我有同样的问题。)

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

(不记得我在网上找到的位置了,但这是我做的:)

  • Click "Start button"

    (点击“开始按钮”)

  • in the search box, enter "Turn windows features on or off"

    (在搜索框中,输入“打开或关闭Windows功能”)

  • in the features window, Click: "Internet Information Services"

    (在功能窗口中,单击:“ Internet信息服务”)

  • Click: "World Wide Web Services"

    (单击:“万维网服务”)

  • Click: "Application Development Features"

    (单击:“应用程序开发功能”)

  • Check (enable) the features.

    (检查(启用)功能。)

    I checked all but CGI.

    (我检查了所有,但CGI。)

btw, I'm using Windows 7.

(顺便说一句,我正在使用Windows 7。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...