IIS 10 with Windows Authentication not working anymore HTTP Error 401.2 - Unauthorized

Luis Cáceres 5 Reputation points
2024-03-18T14:34:06.6566667+00:00

I have created an application with asp.net core mvc v8 that works with Windows authentication in IIS 10.

Setting:

Authentication: all are disabled except Windows authentication.

I have it mounted on a server and I need it to work on my local network. And the users are connected to the same local network.

When I set everything up, it works properly. But then users get a 401.2 error and it always asks for credentials. They are correct but he does not access.

This application does not have a domain name so it is in the ip:port.

I have an active directory.

Users log in with domain1\user and my server has domain2\user.

What I have tried:

  1. Do the research and several have had this problem. And many have solved them by configuring in regedit creating a multi-string value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 with the name of BackConnectionHostNames and placing the host, since I do not have a domain name, place ip:port and not It worked for me.
  2. Go to my application in iis, click on authentication and modify the providers, leaving only the NTLM and it didn't work either.
  3. Also this:

Disable NEGOTIATE protocol in the client workstation to confirm the issue is the one described.

Open the Registry Editor (start - run - regedit.exe)

Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\

Locate the registry entry EnableNegotiate

Change the value to 0

Restart the client workstation and neither.

  1. Also try disabling windows authentication, enabling anonymous authentication, and selecting Application pool identity. Also giving my application pool permissions on my project folder. Which didn't work either.

At this point I don't know what to do.

I appreciate your help.

Internet Information Services
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,166 questions
{count} vote