IIS 7 - Windows身份验证

时间:2012-09-18 01:27:45

标签: php iis-7 iis-7.5

我的网络服务器正在运行:IIS 7 PHP 5

我正在尝试在我们的Intranet站点中打印当前Intranet登录用户。所以我禁用了匿名身份验证并启用/启用了Windows身份验证。下面是我的PHP脚本:

<?php
$user = $_SERVER['LOGON_USER'];
echo "$user";
?>

我在IIS 7模块中启用了WindowsAuthenticationModule,在IIS 7身份验证中启用了Windows身份验证:

System.Web.Security.WindowsAuthenticationModule, System.Web, Version=2.0.0.0, Culture=neutral,.....

代码在IE和Google Chrome中运行得非常好 - 它显示了DOMAIN \ usernamme,我没有被要求进行任何用户名/密码验证挑战。但是在FF中,我得到了身份验证挑战,并且无论我输入什么值(错误/正确),它都会继续重复。点击取消后,我得到以下信息:

Error Summary
HTTP Error 401.2 - Unauthorized
You are not authorized to view this page due to invalid authentication headers.
Detailed Error Information
Module  IIS Web Core
Notification    AuthenticateRequest
Handler PHP
Error Code  0x80070005
Requested URL   http://localhost:8080/phpinfo.php
Physical Path   C:\inetpub\wwwroot\phpinfo.php
Logon Method    Not yet determined
Logon User  Not yet determined
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.
    Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.

Links and 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 »

Microsoft Knowledge Base Articles:

    907273
    253667

我不确定我接下来要做什么,因为使用相同的配置,它在IE和Chrome中运行良好?

1 个答案:

答案 0 :(得分:2)

默认情况下,Firefox不启用Windows集成身份验证。它需要在高级配置对话框中设置一些可信站点。还有其他解决方案,包括运行IETab扩展(类似于Chrome Frame)

这是一个SO link,它描述了必要的配置:

我已经对此进行了测试,但它似乎正在运行。