Please why this is working for me, only when I am running my web app on localhost? I am starting the project from Visual Studio.I set wrong SPN for https://localhost:44396 than its throwing error as expected.
System.Net.AuthenticationManager.CustomTargetNameDictionary .Add("https://localhost:44396/", "HTTP/incorrect_value");
But when I deploy my app on IIS server, than its not working. When I set the wrong value on client, the windows authentication is still working fine
System.Net.AuthenticationManager.CustomTargetNameDictionary .Add("https://myapp.domain.com/", "HTTP/incorrect_value");
Why my client is still passing the windows authentication, even when I set wrong SPN for the destination URL?