Score:0

local IIS asp.net mvc web application using windows authentication keep prompting for credentials

tc flag

I'm using windows 10 enterprise. localhost/mywebapp even not hitting home controller rather stuck on windows authentication prompt and no matter if I enter correct credential or bad credential it keep asking again and again. I'm not able to debug via code since it is not even going index controller. What is the best way to pin point the issue? I already checked IIS logs and not helpful at all. thanks in advance.

I captured the IIS log file in the following scenarios When I put url to localhost on edge browser ( tested in chrome also same result)

2022-11-22 16:35:52 ::1 GET /MyApp.Web - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/107.0.0.0+Safari/537.36+Edg/107.0.1418.52 - 401 2 5 110
2022-11-22 16:35:52 ::1 GET /MyApp.Web - 80 MyDomain\MyUname ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/107.0.0.0+Safari/537.36+Edg/107.0.1418.52 - 401 2 5 299

After I put my credential the following output to IIS log :

2022-11-22 16:38:19 ::1 GET /MyApp.Web - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/107.0.0.0+Safari/537.36+Edg/107.0.1418.52 - 401 2 5 15
2022-11-22 16:38:19 ::1 GET /MyApp.Web - 80 MyDomain\MyUname ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/107.0.0.0+Safari/537.36+Edg/107.0.1418.52 - 401 2 5 426
2022-11-22 16:38:19 ::1 GET /MyApp.Web - 80 MyDomain\MyUname ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/107.0.0.0+Safari/537.36+Edg/107.0.1418.52 - 401 2 5 204

login prompted again, this time I entered wrong credentials, login prompt showed up again.

2022-11-22 16:40:29 ::1 GET /MyApp.Web - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/107.0.0.0+Safari/537.36+Edg/107.0.1418.52 - 401 2 5 26
2022-11-22 16:40:33 ::1 GET /MyApp.Web - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/107.0.0.0+Safari/537.36+Edg/107.0.1418.52 - 401 1 3221225581 85
2022-11-22 16:40:33 ::1 GET /MyApp.Web - 80 MyDomain\MyUname ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/107.0.0.0+Safari/537.36+Edg/107.0.1418.52 - 401 2 5 253
Lex Li avatar
vn flag
When you said "I already checked IIS logs and not helpful at all", you'd better edit the question and include some rows for us to see. 401.1 or 401.3 matters a lot while you might not be able to identify.
kneethan avatar
tc flag
@LexLi Please see my updated post with IIS log outputs with various scenarios.
Lex Li avatar
vn flag
https://learn.microsoft.com/en-US/troubleshoot/windows-server/networking/accessing-server-locally-with-fqdn-cname-alias-denied#method-2-disable-the-authentication-loopback-check Can you try to disable loopback check and try again?
kneethan avatar
tc flag
@LexLi I did after some suggested in this forum but I still got the same looping authentication, is there any way to exactly pin point the issue ?
Lex Li avatar
vn flag
IIS simply passes the credentials to AD for verification. So there isn't much to do on this machine alone. Ask your domain administrators to assist.
kneethan avatar
tc flag
@LexLi to get the IT support on AD is bit hard for me , takes a lot of time ( need to create ticket and stuff), My windows authentication works fine for me to login to my machine. so that credentials are fine. I still dont' understand why it is keep pushing for uname/pwd for valication no mater what I put for uname/pwd ? I mean what is the reason of looping?
kneethan avatar
tc flag
@LexLi I have created simple asp.net web mvc and used local IIS with windows authentication and everything working as it suppose to, I mean correct credentials logs in then wrong credentials looped. ( I tested chrome incogntio mode), since if I use regular browser it will automatically logged in. So is this prove my AD is ok?? where can I narrow down the issue now?
kneethan avatar
tc flag
I was able to resolve (not a real solution) this Looping issue by unistalling IIS -->WWW Services --> Security -->URL Authorization . @LexLi this will give any hint of my looping issue??
bjoster avatar
cn flag
Persistent IIS domain authentication is not supported on ::1 and 127.0.0.1 (your local loopback addresses) and does have it's difficulties on the local machine. Please use logs from a remote client.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.