Re: whoami?

From: Shel Blauman [MSFT] (sheldonb_at_online.microsoft.com)
Date: 08/11/03


Date: Mon, 11 Aug 2003 10:15:40 -0700


You should be able to get it by running that code on the server. I don't
know if there's a way to get that from the client, the Remote Desktop
Connection is passing your logon information to the server, and I don't know
how you would pick that info up.

Shel

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Ric" <Ricky@Rios.org> wrote in message
news:031f01c35ee8$f7150780$a101280a@phx.gbl...
> Using
>
> AppDomain.CurrentDomain.SetPrincipalPolicy
> (PrincipalPolicy.WindowsPrincipal);
> WindowsPrincipal principal = (WindowsPrincipal)
> Thread.CurrentPrincipal;
> WindowsIdentity identity = (WindowsIdentity)
> principal.Identity;
> MessageBox.Show("You Are "+ identity.Name);
>
> In this example, "identity.Name" holds my username as user
> of my local PC.
>
> If at the same time I'm logged in to a W200x server with a
> different username, how do I get this last one?
>


Relevant Pages

  • Has your problem been resolved
    ... username not showing in ISA log ... They probably aren't using the proxy server. ... Troubleshooting Client Authentication on Access Rules in ISA Server 2004 ...
    (microsoft.public.isaserver)
  • Re: No username prompt SSHD
    ... it is the client side. ... The client takes the current user and passes that to the server as the ... To override this you must supply a username to the client in one of two ways: ... $ ssh -l login serveur ...
    (SSH)
  • Re: XP Client Cant Log In To Server After Initial Setup
    ... username, and the domainname is the netbios name of your domain (you can ... check that on the server). ... "Bob N." ... I logged onto one of the client ...
    (microsoft.public.windows.server.sbs)
  • Re: ISA Server 2000 and Terminal Server 2000
    ... Does the ISA server ask for username and password when accessing the web ... Do I need to install the ISA Client on the TS? ...
    (microsoft.public.isa)
  • Re: Stange access problem
    ... This one user cannot access his Exchange account, ... the internet, or any other server resource, even after logging on with his ... it asks for his username and password. ... There are no strange problems installed on the client computer. ...
    (microsoft.public.backoffice.smallbiz)

Loading