Can't get logonuser

From: Dave Clark (
Date: 08/13/03

Date: Wed, 13 Aug 2003 13:42:12 -0700

After looking again, I think the WindowsIdentity gets the
<domain>\<username> instead of what I say below.

>-----Original Message-----
>I'm pretty new at ASP.Net, but even when I had Anonymous
>off and Integrated Windows Authentication on,
>ServerVariables("LOGON_USER") is still empty. Here's
>I did to get the logged on user.
>Dim thisUser As System.Security.Principal.WindowsIdentity
>Dim UserLog As String
>UserLog = thisUser.GetCurrent.Name.ToString
>UserLog will contain the <machineName>/<logged on user>,
>such as ntsrvr1/ASPNET, if you're running in debug.
>out "ASPNET" for the logged on user.
>>-----Original Message-----
>>I would like to get user logon from server by
>> USERLog = Request.ServerVariables("LOGON_USER")
>>but it isn't see. i don't know what the problem
>how i can
>>solve in this. But i try to get other value can see
>>*** Sent via Developersdex
>>Don't just participate in USENET...get rewarded for it!

Relevant Pages

  • Re: Active Directory and SQL Server Connection
    ... You need to switch identities by using the WindowsIdentity class in the .NET ... One is the IIS server the other is ... when we have anonymous access ...
  • Re: Construcing NetworkCredential from WindowsIdentity?
    ... able to impersonate that WindowsIdentity and then use ... > Here I have full access to my Identity (WindowsIdentity). ... > For the business component to acess the Exchange Server in my datatier, ...
  • Re: System.ApplicationException: Access is denied
    ... I'm not sure what is exactly causing this, but the only times I've gotten an ... ApplicationException from WindowsIdentity were when there were Kerberos ... It works fine on my local server and the qa test server, ... webs on that server have not had this issue, however, this single ...
  • Re: whoami?
    ... You should be able to get it by running that code on the server. ... know if there's a way to get that from the client, ... > WindowsIdentity identity = ... "identity.Name" holds my username as user ...
  • whoami?
    ... WindowsIdentity identity = ... "identity.Name" holds my username as user ... If at the same time I'm logged in to a W200x server with a ...