I want to do auto login to .net core API using windows authentication.
I have enabled windows authentication and rest all authentication is kept disabled. now I am trying to run the API. its prompt popup for enter the credentials for login.
I do not want any popup which asks users to enter login details. its should auto authenticate using the current login user. however, if I enter login details in that popup, still it's not getting authenticate, it keep asking me to enter the credentials.
Tried approach:
Reference: I have implemented windows authentication by referring to this article
Note: When I run API from visual studio (IIS Express) its works fine, but when I host API to local IIS, then I am facing a challenge as I described above
You have to whitelist a domain specified in the hosts file in order for windows authentication to work:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
DisableStrictNameChecking
and press ENTER.DisableStrictNameChecking
registry value and type 1 in the Value data box, click OKHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
BackConnectionHostNames
, and then press ENTER.BackConnectionHostNames
, and then click Modify.