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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈