0

Web.config file

<authentication mode="Windows" />     

<authorization>
  <allow users ="*" />
</authorization>

IIS permissions

(Unchecked)Enable ananymouse access
(Checked)Integrated windows authentication

C# code,

welcomeUser.InnerText = Request.ServerVariables.Get("LOGON USER");

What am I missing to be able to display Windows User ID ?

HOY
  • 1,067
  • 10
  • 42
  • 85

1 Answers1

0

I think the variable is LOGON_USER isn't it? (With underscore) See here

You may find that this gives you IUSR_MachineName though, so you might want to look up better ways of finding the actual logged in user, such as User.Identity.Name or by using WindowsIdentity.GetCurrent().Name;

SpaceBison
  • 3,704
  • 1
  • 30
  • 44