Return value of WindowsIdentity.GetCurrent()

  • Thread starter Thread starter Stefan Hoffmann
  • Start date Start date
S

Stefan Hoffmann

hi,

I'm currently playing with Impersonation. This raised the folowing question:

Can the simple, parameter-less

WindowsIdentity.GetCurrent()

return a null?


Respectively:
Can the overload

WindowsIdentity.GetCurrent(bool ifImpersonating)

or

WindowsIdentity GetCurrent(TokenAccessLevels desiredAccess)

return a null?


mfG
--> stefan <--
 
If never seen WindowsIdentity.GetCurrent() or
WindowsIdentity.GetCurrent(false) return null. I believe those two
calls are equivalent. The other overload or ifImpersonating == true
will indeed return null.
 
If never seen WindowsIdentity.GetCurrent() or
WindowsIdentity.GetCurrent(false) return null. I believe those two
calls are equivalent. The other overload or ifImpersonating == true
will indeed return null.
 
Back
Top