SecurityContext.SuppressFlowWindowsIdentity メソッド

定義

非同期スレッド間の現在のセキュリティ コンテキストのWindows ID 部分のフローを抑制します。

public:
 static System::Threading::AsyncFlowControl SuppressFlowWindowsIdentity();
public static System.Threading.AsyncFlowControl SuppressFlowWindowsIdentity();
[System.Security.SecurityCritical]
public static System.Threading.AsyncFlowControl SuppressFlowWindowsIdentity();
static member SuppressFlowWindowsIdentity : unit -> System.Threading.AsyncFlowControl
[<System.Security.SecurityCritical>]
static member SuppressFlowWindowsIdentity : unit -> System.Threading.AsyncFlowControl
Public Shared Function SuppressFlowWindowsIdentity () As AsyncFlowControl

返品

フローを復元するための構造。

属性

例外

.NET 5+ (.NET Core を含む): すべてのケースで。

注釈

SecurityContext が非同期スレッド間で移行するときに、Windows ID のフローを抑制するには、このメソッドを使用します。

返されたAsyncFlowControl構造体で Undo メソッドを使用して、SecurityContext オブジェクトを以前の状態に戻します。

Note

共通言語ランタイム (CLR) は、マネージド コードのみを使用して実行される偽装操作を認識します。プラットフォームからアンマネージド コードへの呼び出しや Win32 関数への直接呼び出しなど、マネージド コードの外部で実行される偽装は認識されません。 WindowsIdentity要素が alwaysFlowImpersonationPolicy (true) に設定されていない限り、マネージド <alwaysFlowImpersonationPolicy enabled="true"/> オブジェクトのみが非同期ポイント間でフローできます。 alwaysFlowImpersonationPolicy 要素を true に設定すると、偽装の実行方法に関係なく、Windows ID が常に非同期ポイント間を流れます。 非同期ポイント間でアンマネージ 偽装をフローする方法の詳細については、「 <alwaysFlowImpersonationPolicy> 要素」を参照してください。

適用対象