ImpersonateOnSerializingReplyMessageProperty.StartImpersonation Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts impersonating with the caller's context if impersonation is enabled on the service and sets the appropriate principal on the thread as per the service configuration.
public:
void StartImpersonation([Runtime::InteropServices::Out] IDisposable ^ % impersonationContext, [Runtime::InteropServices::Out] System::Security::Principal::IPrincipal ^ % originalPrincipal, [Runtime::InteropServices::Out] bool % isThreadPrincipalSet);
public void StartImpersonation (out IDisposable impersonationContext, out System.Security.Principal.IPrincipal originalPrincipal, out bool isThreadPrincipalSet);
member this.StartImpersonation : IDisposable * IPrincipal * bool -> unit
Public Sub StartImpersonation (ByRef impersonationContext As IDisposable, ByRef originalPrincipal As IPrincipal, ByRef isThreadPrincipalSet As Boolean)
Parameters
- impersonationContext
- IDisposable
When this method returns, contains the impersonated context. This parameter is treated as uninitialized.
- originalPrincipal
- IPrincipal
When this method returns, contains the original principal on the thread before invoking this method. This parameter is treated as uninitialized.
- isThreadPrincipalSet
- Boolean
When this method returns, contains a value that indicates whether the principal was set on the thread by this method. This parameter returns false
if the operation context was not available to impersonate. This parameter is treated as uninitialized.
Applies to
.NET