Re: new WindowsIdentity(token) not authenticated
From: Eric Johannsen (nospam-news_at_johannsen.us)
Date: 03/08/04
- Next message: Shawn Farkas: "Re: Dumb Q - Signing an assembly"
- Previous message: Eugene V. Bobukh [MS]: "Re: Read Access to All Directories"
- In reply to: Hernan de Lahitte: "Re: new WindowsIdentity(token) not authenticated"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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);
>
>
- Next message: Shawn Farkas: "Re: Dumb Q - Signing an assembly"
- Previous message: Eugene V. Bobukh [MS]: "Re: Read Access to All Directories"
- In reply to: Hernan de Lahitte: "Re: new WindowsIdentity(token) not authenticated"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|