【问题标题】:How to disable IIS express all authentication?如何禁用 IIS express 所有身份验证?
【发布时间】:2016-12-16 11:31:29
【问题描述】:

对于 Windows 7 上的 IIS express 8.0,我在 applicationhost.config 文件中设置了身份验证设置。

    <authentication>

        <anonymousAuthentication enabled="false" />

        <basicAuthentication enabled="false" />

        <clientCertificateMappingAuthentication enabled="false" />

        <digestAuthentication enabled="false" />

        <iisClientCertificateMappingAuthentication enabled="false">
        </iisClientCertificateMappingAuthentication>

        <windowsAuthentication enabled="true">
            <providers>
                <add value="Negotiate" />
                <add value="NTLM" />
            </providers>
        </windowsAuthentication>
    </authentication>

当我windowsAuthentication enabled="true">时,我得到一个提示windows帐户和密码的弹出框。我进去了,一切都很好。

但是,我想禁用所有身份验证,因为这是在内部使用的。所以,我先禁用了 windowsAuthentication。然后尝试 anonymousAuthentication enabled="true" />,我得到 401.2 错误以及消息“访问被拒绝”。如果我更改为 anonymousAuthentication enabled="false" />,我会收到相同的 401.2 错误,但来自浏览器的行不同且更多:

HTTP Error 401.2 - Unauthorized
You are not authorized to view this page due to invalid authentication headers.
Most likely causes:
•No authentication protocol (including anonymous) is selected in IIS.
•Only integrated authentication is enabled, and a client browser was used that does not support integrated authentication.
•Integrated authentication is enabled and the request was sent through a proxy that changed the authentication headers before they reach the Web server.
•The Web server is not configured for anonymous access and a required authorization header was not received.
•The "configuration/system.webServer/authorization" configuration section may be explicitly denying the user access.
Things you can try:
•Verify the authentication setting for the resource and then try requesting the resource using that authentication method.
•Verify that the client browser supports Integrated authentication.
•Verify that the request is not going through a proxy when Integrated authentication is used.
•Verify that the user is not explicitly denied access in the "configuration/system.webServer/authorization" configuration section.
•Check the failed request tracing logs for additional information about this error. For more information, click here. 
More Information:
This error occurs when the WWW-Authenticate header sent to the Web server is not supported by the server configuration. Check the authentication method for the resource, and verify which authentication method the client used. The error occurs when the authentication methods are different. To determine which type of authentication the client is using, check the authentication settings for the client. 
View more information »

我能做什么?我想在没有任何身份验证的情况下访问该页面。

【问题讨论】:

标签: iis iis-express


【解决方案1】:

我解决了。 在windowsAuthentication enabled="false"> anonymousAuthentication enabled="true"/>之后,我在网上找到了另一个我以前不知道的配置,web.config。我的 web.config 中的行:

deny users="?"/>

我改成:allow users="?"/>

现在,一切都很好。

【讨论】:

    猜你喜欢
    • 2016-06-17
    • 2011-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-30
    • 1970-01-01
    • 2018-02-02
    • 1970-01-01
    相关资源
    最近更新 更多