Re: capture window username to imporsonate

From: Peter Rilling (peter_at_nospam.rilling.net)
Date: 02/04/04


Date: Wed, 4 Feb 2004 05:53:12 -0800

He indicated that he was using ASP.NET. In this case,
SystemInformation.UserName might not work becuase ASP.NET is running in a
special account.

As for the password, imagine how insecure the system would be if any program
at any time could read both the username and password. Trojan horses would
have a field day. So, no, it is probably not possible to read the password.

ASP.NET makes it relatively easy to impersonate the logged in user. It has
been a while since I had to do this but you might try turning anonymous off
and setting the @impersonate attribute on the <identity> tag to "true" in
the machine.config. That way the ASP.NET process takes on the identity of
the person who is sitting at the browser.

"Jax" <anonymous@discussions.microsoft.com> wrote in message
news:ADA89F2C-ADC2-4CB5-A7F4-B505A41F571E@microsoft.com...
> The userName can be got like this:
>
> SystemInformation.UserName
>
> Dont know about the password though.



Relevant Pages

  • Re: file download
    ... The problem is impersonate got failure. ... after impersonate i writen the username, its shows the current username and ... Most likely they are in a folder that does not ... Noww when I click the download button, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: how would you implement user impersonation in database-driven website?
    ... up an impersonation system, so I don't need their passwords. ... someone has to know a good username and password combo, ... That would give me the ability to impersonate ... you set a session variable indicating that the user is ...
    (comp.lang.php)
  • Re: how to pass nt password ?
    ... > f) the logonuser fucntion requires username, ... > Hope this explains why i want to pass my "password" onto other machines to impersonate. ... Services can have their own credentials. ... So long as the account exists on the local machine, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Query AD using Integrated Authentication?
    ... trying to do a bind with a username and a blank password. ... The way you have to do this with WIA is to impersonate the logged on user ... the credentials of the current security context (the user you are ... how to pass the username/password information while using Integrated ...
    (microsoft.public.dotnet.framework.aspnet.security)