1

I've created an ASP .NET Core 6 Web App with Windows authentification from a template enter image description here and I assume that current Windows user's credentials to be obtained automatically.

Application is working that way while debugging in Visual Studio 2022 (in Debug) enter image description here But when being deployed on a server (Windows Server 2012 R2+IIS 8.5) in a local network - user login prompt dialog appears enter image description here

How to get rid of this dialog and force my application to get current Windows user's credentials autimatically?

Thank you in advance.

bairog
  • 3,143
  • 6
  • 36
  • 54
  • A site hosted at localhost is trusted by the browser, so that user credentials are sent directly. If you want `https://xxx.xxx.ru` to be trusted by your browser, learn the browser settings. There is nothing you need to change on IIS. – Lex Li Feb 01 '22 at 05:18
  • 1
    As far as I know, the IE browser's security settings contains the "automatic logon only in intranet zone", this could cause this issue. Moore details, you could refer to this [answer](https://stackoverflow.com/questions/55029358/mvc-5-prompt-for-windows-authentication-only-once/55038404#55038404). – Brando Zhang Feb 01 '22 at 07:33

1 Answers1

0

This is a system setting on the client. On Windows, find it in Control Panel => Internet Options => Security => Local Intranet => Sites => Advanced. Make sure your domain name or IP address is in this list.

If this is not your problem, there's a long discussion of the server configuration for Windows authentication here

enter image description here

bbsimonbb
  • 27,056
  • 15
  • 80
  • 110