大网数据广告活动
Web服务器与PHP

Digest authentication fails

· 52CE 我爱测

This article provides workarounds for the problem where digest authentication fails when a client sends a request through a proxy to a site IIS using digest authentication.

This article helps you resolve the problem where digest authentication fails when a client sends a request through a proxy to a site and Microsoft Internet Information Services (IIS) uses digest authentication.

Original product version:   Internet Information Services
Original KB number:   3050055

Symptoms

Consider the following scenario:

  • IIS is configured to use digest authentication.
  • The server receives a request with the Via HyperText Transfer Protocol (HTTP) header. (This behavior occurs if the client request is rerouted through a proxy.)
  • The resource requested is protected by digest authentication.
  • A child request is created in the IIS pipeline. For example, a request is sent for a directory's default document, and the URL that is sent has a slash (/) as the last character.

In this scenario, digest authentication fails and the server returns a 401 response.

Cause

For security reasons, requests routed through a proxy and for which a child request is created in the IIS pipeline, IIS can't trust the digest authentication.

Workaround

Configure the website to use a different kind of authentication. For example, use Windows Authentication or basic authentication over Transport Layer Security (TLS). If you can't, try the following methods:

  • Have the client use a request URL including the file name after the last / character.
  • Set the application pool's managed pipeline mode to Classic.
  • Use the URL Rewrite module to rewrite the URL path from / to /filename.

To use the URL Rewrite module to work around this issue, configure the module as follows:

<system.webServer>
    <rewrite>
        <rules>
            <rule name="<a rule name>" enabled="false">
                <match url="(^$|.*/$)" />
                <action type="Rewrite" url="{R:0}<a file name that you want the users to access>" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 12/17/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。