0

I spun up an IIS server on my domain and verified I could go to http://mycomputername and it displays the default IIS page.

I then enabled Windows Authentication and disabled anonymous authentication and the web.config file now looks like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <security>
      <authentication>
        <anonymousAuthentication enabled="false" />
        <windowsAuthentication enabled="true" />
      </authentication>
    </security>
  </system.webServer>
</configuration>

Now when I go to http://mycomputername I get prompted for a username and password (this is expected).

I type in "domain1\username" and the password and I get a 401 Unauthorized.

I type in just "username" and the password and I get a 200 OK.

I also have a trust from "domain1" to "domain2" and "domain2" users can access this site just fine when they authenticate with "domain2\user2" as the username.

Any ideas on why the authentication works when I don't include the domain for users in "domain1"?

Thanks~!

IIS 6.2 on Windows2012R2 Windows Authentication is enabled and has 2 providers enabled 1

  • Update: it is a 401.2 (win32 status is 5) – Colorado Techie Jun 07 '19 at 22:21
  • Update2: when I look at the IIS logs for the successful request, the username is "domain1\username" even though I typed "username" into the authentication popup. – Colorado Techie Jun 07 '19 at 22:40
  • 1
    What's the web browser? It usually has nothing to do with IIS, but the browser. – Lex Li Jun 08 '19 at 02:28
  • I've tried Chrome, Firefox, and even powershell. Same 401.2 Unauthorized every time. – Colorado Techie Jun 10 '19 at 20:09
  • Maybe you didn't realize that a 401.2/200 pair (success) or 401.2/401.1 pair (failure) in IIS log files is what Windows authentication requires. To track down what the browser sends to Windows/IIS, please learn and use a tool like Telerik Fiddler (which is capable of decoding the user credentials sent in HTTP requests). It is too dry to discuss such without you knowing the basics. – Lex Li Jun 10 '19 at 20:12

0 Answers0