I want to enable windows authentication for my ASP.NET intranet application.
For that, I did the below in my web.config
file.
<system.web>
<authentication mode="Windows" >
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<identity impersonate="true" userName="domain\myusername" password="mypwd" />
</system.web>
And I am trying to access the authenticated user name in my web page as
HttpContext.Current.User.Identity.Name
It throws an "access denied" error message.