I am running an application on an intranet.
I am trying to retrieve the windows username but it is returning the application pool username instead.
I have the following in my web.config file:
And in IIS the following options for the website:
Anonymous Authentication - disabled
ASP.Net Impersonation - disabled (if I enabled this I get 500 Internal Server Error)
Basic Authentication - disabled
Forms Authentication - disabled
Windows Authentication - Enabled
I am trying to retrieve the windows username but it is returning the application pool username instead.
I have the following in my web.config file:
Code:
<system.web>
<authentication mode="Windows"/>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
And in IIS the following options for the website:
Anonymous Authentication - disabled
ASP.Net Impersonation - disabled (if I enabled this I get 500 Internal Server Error)
Basic Authentication - disabled
Forms Authentication - disabled
Windows Authentication - Enabled