共用方式為


ApplicationAccessControlAttribute.ImpersonationLevel 屬性

定義

取得或設定允許呼叫這個應用程式的目標的模擬層級。

public:
 property System::EnterpriseServices::ImpersonationLevelOption ImpersonationLevel { System::EnterpriseServices::ImpersonationLevelOption get(); void set(System::EnterpriseServices::ImpersonationLevelOption value); };
public System.EnterpriseServices.ImpersonationLevelOption ImpersonationLevel { get; set; }
member this.ImpersonationLevel : System.EnterpriseServices.ImpersonationLevelOption with get, set
Public Property ImpersonationLevel As ImpersonationLevelOption

屬性值

其中一個 ImpersonationLevelOption 值。

範例

下列程式代碼範例示範如何使用這個屬性。

// Set component access controls.
[assembly:ApplicationAccessControl(Authentication=AuthenticationOption::Privacy,
ImpersonationLevel=ImpersonationLevelOption::Identify,
AccessChecksLevel=AccessChecksLevelOption::ApplicationComponent)];
// Set component access controls.
[assembly: ApplicationAccessControl(Authentication=AuthenticationOption.Privacy,
                                    ImpersonationLevel=ImpersonationLevelOption.Identify,
                                    AccessChecksLevel=AccessChecksLevelOption.ApplicationComponent)]
' Set component access controls.
<Assembly: ApplicationAccessControl(Authentication:=AuthenticationOption.Privacy, ImpersonationLevel:=ImpersonationLevelOption.Identify, AccessChecksLevel:=AccessChecksLevelOption.ApplicationComponent)>

備註

只有 Windows 2000 和更新版本才支援此屬性。

適用於