Reputation: 8717
My web server is running on : IIS 7 PHP 5
I am trying to print the current intranet logged in user within our intranet site. So I have disable Anonymous authentication and enabled / turned on windows authentication. Below is my PHP script:
<?php
$user = $_SERVER['LOGON_USER'];
echo "$user";
?>
I have WindowsAuthenticationModule enabled in IIS 7 Module and Windows Authentication in IIS 7 authentication:
System.Web.Security.WindowsAuthenticationModule, System.Web, Version=2.0.0.0, Culture=neutral,.....
The code works perfectly fine in IE and Google chrome - it displays DOMAIN\usernamme and I am not asked for any username / password verification challenge. But in FF I get the authentication challenge and it keeps on repeating irrespective of what value (wrong / correct) I enter. On clicking cancel I get the below info:
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
I am not sure what I have to do next as with same config it works fine in IE and Chrome?
Upvotes: 1
Views: 7419
Reputation: 1622
Windows Integrated Authentication is not enabled by default for Firefox. It requires setting some trusted sites in an advanced configuration dialog. There are other solutions which include running IETab extension (similar to Chrome Frame)
Here's a SO link which describes the necessary configuration:
I've tested this, and it appears to be working.
Upvotes: 2