Angular , .NET Core, IIS Express and Windows Authentication

2 years ago I have written about .NET Core Windows Authentication : 

The idea was that for Windows authentication this is mandatory in Web.Config:


Now I want to show how to achieve the same in  IIS Express .NET Core as backend and Angular for front end

For .NET Core / IIS Express

1. Configure IISExpress : 

On short: find %userprofile%\documents\iisexpress\config\applicationhost.config  or %userprofile%\my documents\iisexpress\config\applicationhost.config  and put

<windowsAuthentication enabled="true">
        <add value="Negotiate" />
        <add value="NTLM" />

2.  On your project: Put in launchSettings.json :

“windowsAuthentication”: true,
“anonymousAuthentication”: false,

3.  Optional: To verify add an Action that returns

(this.User?.Identity?.Name ?? "Not ad enabled")

For Angular

return this.http.get(url,{
withCredentials: true

4. ASP.NET Core 2.1

Windows authentication is not enabled after creating project with the Windows authentication option selected
When creating a template with Windows authentication, the settings to enable Windows authentication in launchSettings.json are not applied.
Workaround: Modify launchSettings.json as follows:

“windowsAuthentication”: true,
“anonymousAuthentication”: false,