Edita

Comparteix a través de


ImpersonateOnSerializingReplyMessageProperty.StartImpersonation Method

Definition

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