I am running AD Service and local IIS Service on a Windows Server 2008 R2 Datacenter.
And I try to get the current Windows username in order to login the web application hosted on the IIS.
For some more details, the web application is aims to open to public to visit and enable to get the Windows username with domain name in order to make some AD authentication/SSO.
I had already enabled the "Windows Authentication" & "Anonymous Authentication".
However, "IIS APPPOOL[App_Name]" is gained using System.Security.Principal.WindowsIdentity.GetCurrent().Name
.
Anyone got some idea on how to achieve the aims and get the domain username?
UPDATE:
<system.web>
<anonymousIdentification/>
<authentication mode="Windows"></authentication>
....
I added some line above in the web.config, but I still not able to get the domain/username. And the page is hosted on some link like: