1

I'm trying to set up an ASP.NET application to use Windows Authentication. But the IIS server is not part of a domain, it is a sole server hosted in our Rackspace account.

I'd like to have the Windows Authentication module validate against the list of local Windows users on the IIS server. Is this possible?

Anonymous Authentication is off
Basic Authentication is off
Windows Authentication is on

But when I enter credentials for a local machine account as
machinename\user
password
it doesn't seem to work. It just prompts me again.

enter image description here

eidylon
  • 7,068
  • 20
  • 75
  • 118

2 Answers2

0

Is possible make a local machine validation, like this:

var bool valid = false;
using (var  context = new PrincipalContext(ContextType.Machine))
{
    valid = context.ValidateCredentials(username, password);
}
George Paoli
  • 2,257
  • 1
  • 24
  • 29
  • This looks like you would be doing Forms authentication though, and just checking it manually against the local machine yourself? We need it to be Windows authentication, and pop up with the browser prompt for user/password. – eidylon Jul 21 '20 at 04:00
  • This case, is only enable Windows Authentication in a IIS Site. – George Paoli Jul 21 '20 at 19:41
  • That's what I have. I have Anonymous Authentication turned off, and Windows Authentication turned on. But it doesn't seem to work with a local account that exists on the server (NOT a domain account). – eidylon Jul 21 '20 at 20:57
  • I did a local test successfully. See https://pasteboard.co/JiSPSOP.png – George Paoli Jul 22 '20 at 21:25
0

It appears that you can use local accounts, but I'm getting some kind of server error when the account tries to authenticate.

Once I found the error in the event logs, and got the status code, I was able to track it down, and find this answer, which worked exactly!

eidylon
  • 7,068
  • 20
  • 75
  • 118