Re: new WindowsIdentity(token) not authenticated

From: Eric Johannsen (nospam-news_at_johannsen.us)
Date: 03/08/04


Date: Mon, 08 Mar 2004 22:43:14 GMT

Thanks, seems to work great.

Eric

"Hernan de Lahitte" <hernan@lagash.com> wrote in message
news:eV4nt6UBEHA.580@TK2MSFTNGP11.phx.gbl...
> This property is loaded on the constructror overload that has the
> "isAuthenticated" parameter.
> Check out this sample:
>
> WindowsIdentity(pDuplicateTokenHandle, "NTLM", WindowsAccountType.Normal,
> true)
>
> --
> Hernan de Lahitte
> Lagash Systems S.A.
> http://weblogs.asp.net/hernandl
> Shadowfax Dev Team
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Eric Johannsen" <nospam-news@johannsen.us> wrote in message
> news:eO23c.35775$_e2.26598@newssvr25.news.prodigy.com...
> > Hi,
> >
> > I call LogonUser from C# and get an access token, which I pass into the
> > constructor of a new WindowsIdentity object like this:
> >
> > WindowsIdentity wi = new WindowsIdentity(tokenFromLogonUser);
> >
> > Unfortunately, when I call
> >
> > wi.IsAuthenticated();
> >
> > the result is false. What do I have to do for IsAuthenticated() to
> reflect
> > the fact that the user is logged on and, thus, (as far as I understand)
> > authenticated?
> >
> > Thanks,
> >
> > Eric
> >
> > PS - The call to LogonUser looks like this:
> >
> > loggedOn = LogonUser(username, domain, pwd,
> > // Logon type = LOGON32_LOGON_NETWORK_CLEARTEXT.
> > 3,
> > // Logon provider = LOGON32_PROVIDER_DEFAULT.
> > 0,
> > // The user token for the specified user is returned here.
> > tokenFromLogonUser);
>
>



Relevant Pages

  • Re: File shredding/Scrubbing/Wiping Security classes for C#/.Net
    ... Hernan de Lahitte ... Lagash Systems S.A. ... Shadowfax Dev Team ...
    (microsoft.public.dotnet.security)
  • Re: MD5 implementation
    ... > How do I get a string in the .NET version that I can compare to the PHP ... > "Hernan de Lahitte" wrote in message ... >> Lagash Systems S.A. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Automatically Logout...
    ... Hernan de Lahitte ... Lagash Systems S.A. ... Shadowfax Dev Team ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Failed to start monitoring changes
    ... Connection Firewall or any other firewall turned on? ... Hernan de Lahitte - MSDE ... > I connect to a remote SQL Server using SQL authentication, ...
    (microsoft.public.dotnet.security)
  • Re: Product Key dilemma
    ... This posting is provided "AS IS" with no warranties, ... > "Hernan de Lahitte" wrote in message ... >>> product key should be an encrypted string representing some information. ...
    (microsoft.public.dotnet.security)