San

San

  • 884
  • 804
  • 314.2k

Windows Auth in IIS does not work when browsing to the

Jul 4 2019 4:08 AM
Hi,
 Windows Auth in IIS does not work when browsing to the website on the server running IIS using a URL.
 
I have a situation and would highly appreciate any inputs.
 
So that situation is :-
 
1. I have a Web application made in Angular for UI and .net core webAPI application for API.
2. I have created CI-CD for my application and it is deployed in IIS server 7.
3. I have enabled windows auth for the individual sites in IIS, disabled anonymous auth.
4. we dont have to save the user to DB as the user wil be available in DB.
5. Windows Auth in IIS does not work when browsing to the website on the server running IIS using a URL.
6. When i open my dev URL for the application, it does ask me to login with my credentials, but when i login, i dont see my user details. I have a UI where i am showing the current user. When i run the application in local, i can see my user details(Current User:DOMAIN\Sandeep.Jamkar). But when i deploy the application in IIS and run it, i dont see my user detals. I see this "Current User:NT AUTHORITY\NETWORK SERVICE "
 
I ran out of options on how to display user details?  Any help would be highly appreciated.
 
And i also want to know, if i give my credentials in windows auth for the application, how can i save that info to the DB? 
 
Thanks. 

Answers (1)