【问题标题】:Problem Configuring "Location" Path Security on Machine.config在 Machine.config 上配置“位置”路径安全性的问题
【发布时间】:2011-03-10 17:52:21
【问题描述】:

我正在尝试在 Machine.config 中添加类似的内容:

<location path="elmah.axd">
    <system.web>
        <authorization>
            <allow users="domain\johnny" />
            <deny users="*"/>
        </authorization>
    </system.web>
</location>

这在应用程序级别的 web.config 中效果很好,但我无法让它在 machine.config 中生效。基本上,我正在尝试为所有应用程序中的“elmah.axd”路径设置安全性。当此代码放置在 machine.config 或根/服务器级别的 web.config 中时,未应用安全性。无论我做什么,它都允许所有用户访问“elmah.axd”。

【问题讨论】:

  • 嗨,斯科特。你有没有找到解决这个问题的方法?

标签: asp.net configuration path web-config machine.config


【解决方案1】:

确保您没有在 web.config 中覆盖它

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-23
    • 1970-01-01
    • 1970-01-01
    • 2011-10-17
    • 2016-05-05
    • 1970-01-01
    • 2020-11-20
    • 1970-01-01
    相关资源
    最近更新 更多