First of all put this lines inside web.config configuration section:
<authentication mode="Windows"/>
<authorization>
<deny users="?"/>
</authorization>
<identity impersonate="true"/>
Second go to IIS manager open your web app properties and check following settings for Authentication:
Anonymous Authentication = Disabled,
ASP.NET Impersonation = Enabled (this is not realy required),
Windows Authentication = Enabled
This settings will give you Active Directory User and also impersonate it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…