IIS8 Win8和 runAllManagedModulesForAllRequest = “ true”

我试图在 IIS8中运行一个应用程序,它在配置中包含以下内容:

<modules runAllManagedModulesForAllRequests="true" />

IIS8给我的错误是..。

无法在此路径上使用此配置节 当节在父级别锁定时 Default (overrideModeDefault = “ Deny”) ,或者由位置显式设置 使用 overrideMode = “ Deny”或遗留 allowOverride = “ false”的标记。

通过错误和快速搜索,我猜测有一些更高级别的安全设置阻止该行被允许。有什么想法吗?

71419 次浏览

its hard to give a specific answer here, but the basics of it are that you need to look at the machine.config for the box you're running on. find the system.webServer node and look for the 3 tags/attributes its referencing in the error. chances are you'll find something that is marked as not overridable (allowOverride="false"), but i've not messed with windows 8/server 2012 yet, so i don't know what the machine.config looks like.

I've solved the same problem by installing the window features "Internet Information Service/World Wide Web Service/Application Development/ASP.NET x.x" in the Control Panel of Windows8. If you want to setting on Windows Server 2012, the following link gives you hint. http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45

hope that it works out.

For those of you running Windows Server 2012 the Application Development features are found at

[] Server Roles [] Web Server IIS [] Web Server [] Application Development [] ASP.NET x.x

When you select the .NET version it will ask if you want to add Extensions and other features. I just said yes, but you may be able to get away without installing those.

You can unlock the section via the IIS UI per https://serverfault.com/a/516921/137255

  1. Open IIS Manager
  2. Click the server name in the tree on the left
  3. Right hand pane, Management section, double click Configuration Editor
  4. At the top, choose the relevant section based on the offending item's XPath; i.e. system.webServer/modules for this example.
  5. Right hand pane, click Unlock Section