Re: IsInRole always return fasle on secure remoting call (Framework 2.0)
- From: "Eric" <bigfoot@xxxxxxxxxxxxxxxx>
- Date: Fri, 3 Mar 2006 08:55:22 -0000
Thanks for your reply.
I am calling the IsInRole within a Windows Service which is running under a
account with enough privileges to query AD.
In Fact, if the remote caller is the same that the account running the
service then
WindowsPrincipal aWinPrinc = new
WindowsPrincipal(WindowsIdentity.GetCurrent());
InRole = aWinPrinc.IsInRole("KVSHQ\\Domain Users"); // WORKS (return true)
InRole = System.Threading.Thread.CurrentPrincipal.IsInRole("KVSHQ\\Domain
Users"); // DO NOT WORK (return false)
In this case the identity of the window service and the current principal of
the current thread are the same, but the IsInRole returns different result.
What I do not underatand is why if the second call fails to resolve
IsInRole, why no exception is thrown, instead it returns false which is the
wrong result!!
What I am missing?
Thanks for your help.
Cheers,
Eric
.
- Follow-Ups:
- Re: IsInRole always return fasle on secure remoting call (Framework 2.0)
- From: Luke Zhang [MSFT]
- Re: IsInRole always return fasle on secure remoting call (Framework 2.0)
- References:
- RE: IsInRole always return fasle on secure remoting call (Framework 2.0)
- From: Luke Zhang [MSFT]
- RE: IsInRole always return fasle on secure remoting call (Framework 2.0)
- Prev by Date: RE: IsInRole always return fasle on secure remoting call (Framework 2.0)
- Next by Date: Re: DataTable to String
- Previous by thread: RE: IsInRole always return fasle on secure remoting call (Framework 2.0)
- Next by thread: Re: IsInRole always return fasle on secure remoting call (Framework 2.0)
- Index(es):
Relevant Pages
|