Authentication windows windows asp.net on local iis

I created the default asp.net core application from the defaut template. I chose the Windows authentication option when creating a new project (this is what I did) . When I run the application on issexpress, it works like a charm.

When I moved the application to local iis, it works, but it does not receive user information. I have enabled Windows authentication in Windows features. But it shows me an empty User.Identity.Name. I tried adding these lines to web.config

<security> <authentication> <windowsAuthentication enabled="true" /> <anonymousAuthentication enabled="false" /> </authentication> </security> 

Tried to enable Windows authentication from IIS Manager. I do not know what else could be wrong. What am I missing?

+6
source share
2 answers

I could solve this problem. I turned on Windows authentication on the local iis, and after that, local authentication worked like a charm. Here's a good article on how to do this.

0
source

In web.config you put

 <authentication mode="Windows" /> 

in the system.web sector?

+1
source

All Articles