Simplistically put, you need the following:
1) In IIS console you need to set the Authentication method for the
application folder to Integrated Windows Security (typically this is just
unchecking anonymous access)
2) Make sure the NT folder's security permissions allow access for the
required users i.e. Authenticated Users...or at least the users / groups
notes in next step
3) In web.config enable impersonation <identity impersonate="true">
And allow all users...or at least the domain users and/or groups who
should have access
i.e. <authorization>
<allow users="*">
</authorization>
4) Use System.Security.Principal (vb Imports or c# Using)
5) Get the name in code i.e.in vb
' get the domain\user name
Dim userName As String = WindowsIdentity.GetCurrent.Name
I would strongly reccomend you look at
http://msdn.microsoft.com/library/de...cnetlpmsdn.asp
(can also get this as a book, which I highly reccomend)
"Dave" <no****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Greetings,
I have a web application that will be hosted on our intranet. I would
like to determine, via code the user's windows login name and domain in
the following format: DOMAIN\loginname
Is this possible? Thanks,
-Dave