I recently started playing with windows authentication. Due to some requirement to collect user details under our domain without asking credentials, I started with windows authentication.
Im working in VS2015 and the application is running in IIS Express. For windows authentication I enabled windows authentication is Web.config as below
<authentication mode="Windows">
</authentication>
Then altered the iis express config script to this
<windowsAuthentication enabled="true">
<providers>
<add value="Negotiate" />
<add value="NTLM" />
</providers>
</windowsAuthentication>
and also this one
<add name="WindowsAuthenticationModule" lockItem="false" />
under modules
Then this one
under section group name authentication
<section name="windowsAuthentication" overrideModeDefault="Allow" />
then I specified it in my source of a web page.
<h3><%= User.Identity.Name %></h3>
But it doesnt returns anything when running from VS. But if I deploy this to Real IIS with windows authentication only enabled it shows the current user name inside the H3
Really havent got an idea what I missed or what I did wrong...