Re: Getting username

From: Nicole Calinoiu (nicolec_at_somewhere.net)
Date: 07/30/04


Date: Fri, 30 Jul 2004 12:19:27 -0400

There are three identities that may be of interest:
HttpContext.Current.User, WindowsIdentity.GetCurrent(), and
Thread.CurrentPrincipal. Depending on the exact details of your
authentication and impersonation scheme, one or more of these may contain
the identity you want. See
http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetAP05.asp for
details.

HTH,
Nicole

"Vik" <viktorum@==hotmail.com==> wrote in message
news:OTIijAldEHA.2752@TK2MSFTNGP12.phx.gbl...
> An ASP.NET page uses Windows authentication method for the user log in.
> How
> can get the username by code in this page?
>
> Thanks.
>
>



Relevant Pages

  • Re: Too many authentication failures
    ... If it doesn't cause ssh to use only identities, ... IdentitiesOnly causes ssh to use only the specified ... public keys during public-key authentication (normally, ...
    (comp.security.ssh)
  • Re: Too many authentication failures
    ... PH> for that host will not attempt to send |>|>| keybased identities. ... PH> of password | authentication. ... This means that, *during publickey authentication*, it will only use ...
    (comp.security.ssh)
  • Re: Getting username
    ... That depends on what you mean by "using Windows authentication". ... connections to SQL Server are failing when it is supposed that the ... Depending on the exact details of your ...
    (microsoft.public.dotnet.framework.aspnet)