Re: Get the current logged in user name

From: Jim in Arizona (tiltowait_at_hotmail.com)
Date: 08/03/05


Date: Tue, 2 Aug 2005 16:12:46 -0700


"Imran Aziz" <imran@tb2.net> wrote in message
news:u18ZSH2lFHA.320@TK2MSFTNGP09.phx.gbl...
> Hello All,
> I am new to .net. I want to use windows authentication to authenticate
> against the current logged in user on the client machine. I believe by
> using windows authentication method, the IIS will send me details of the
> current logged in user at the client machine if integrated windows
> authentication is enabled at IIS. Can anyone please guide me how I can get
> the name of the current logged in client that is making a request to my
> ASP.net application ?
>
> I am trying to look into System.Web.Security class for this but have not
> been able to find a piece of code or guidance of how to do it.
>
> Imran.

I used this in my ASP pages and still use it in ASP.NET although there's
obviously many other was to achieve the same/similar result.

Dim strWho as String
strWho = Request.ServerVariables("AUTH_USER")
or
strWho = Request.ServerVariables("LOGON_USER")

HTH,
Jim



Relevant Pages

  • Re: Get the current logged in user name
    ... I cannot seem to find the container class for this property. ... >> against the current logged in user on the client machine. ... >> windows authentication method, the IIS will send me details of the ... >> Imran. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Get the current logged in user name
    ... I want to use windows authentication to authenticate ... against the current logged in user on the client machine. ... enabled at IIS. ... Imran. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Get the current logged in user name
    ... > against the current logged in user on the client machine. ... > windows authentication method, the IIS will send me details of the ... > authentication is enabled at IIS. ... > Imran. ...
    (microsoft.public.dotnet.framework.aspnet.security)