ScriptManager.AuthenticationService 属性

定义

获取与当前 ScriptManager 实例关联的 AuthenticationServiceManager 对象。Gets the AuthenticationServiceManager object that is associated with the current ScriptManager instance.

public:
 property System::Web::UI::AuthenticationServiceManager ^ AuthenticationService { System::Web::UI::AuthenticationServiceManager ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.AuthenticationServiceManager AuthenticationService { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.AuthenticationService : System.Web.UI.AuthenticationServiceManager
Public ReadOnly Property AuthenticationService As AuthenticationServiceManager

属性值

AuthenticationServiceManager

当前 ScriptManager 实例的 AuthenticationServiceManager 对象。The AuthenticationServiceManager object for the current ScriptManager instance.

属性

注解

AuthenticationServiceManager此属性返回的对象表示在页中注册的身份验证服务。The AuthenticationServiceManager object that is returned by this property represents the authentication service that is registered with the page. 身份验证服务可以在 ScriptManager 控件或关联的控件中定义 ScriptManagerProxyThe authentication service can be defined in the ScriptManager control or in an associated ScriptManagerProxy control.

你可以使用 ASP.NET authentication 服务或使用自定义身份验证服务。You can use the ASP.NET authentication service or use a custom authentication service. 可以通过在页面上的元素中包含一个元素来在标记中添加自定义服务 AuthenticationService asp:ScriptManager ,如下面的示例中所示。You can add the custom service in markup by including an AuthenticationService element inside the asp:ScriptManager element on the page, as shown in the following example.

<asp:ScriptManager ID="SM1" runat="server">  
  <AuthenticationService Path="MyAuthenticationService.asmx" />  
</asp:ScriptManager>  

还可以通过编程方式配置 AuthenticationServiceManager 对象。You can also programmatically configure the AuthenticationServiceManager object. ScriptManager 页面生命周期阶段,会向控件注册服务 PreRenderServices are registered with the ScriptManager control during the page's PreRender life-cycle stage.

适用于