I created default asp.net core application from defaut template. I chose Windows Authentication option during porcess of creation of new project (here is what i did). When i run app on issexpress, it works like a charm.
When i moved app onto local iis it works, but it does not get user info. I enabled windows authentication in windows features. But it shows me empty User.Identity.Name. I tried to add this lines to web.config
<security>
<authentication>
<windowsAuthentication enabled="true" />
<anonymousAuthentication enabled="false" />
</authentication>
</security>
Tried to turn on windows authentication from IIS Manager. I dont know what else can be wrong. What am i missing?
In web.config, did you put
<authentication mode="Windows" />
in system.web sector as well?
I could resolve this issue. I turned on windows authentication feature on local iis and after that local authentication worked like a charm. Here is a good article how to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With