-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
AuthenticationServiceManager.xml
147 lines (130 loc) · 9.69 KB
/
AuthenticationServiceManager.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<Type Name="AuthenticationServiceManager" FullName="System.Web.UI.AuthenticationServiceManager">
<TypeSignature Language="C#" Value="public class AuthenticationServiceManager" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AuthenticationServiceManager extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.AuthenticationServiceManager" />
<TypeSignature Language="VB.NET" Value="Public Class AuthenticationServiceManager" />
<TypeSignature Language="F#" Value="type AuthenticationServiceManager = class" />
<TypeSignature Language="C++ CLI" Value="public ref class AuthenticationServiceManager" />
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultProperty("Path")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultProperty("Path")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.TypeConverter(typeof(System.Web.UI.EmptyStringExpandableObjectConverter))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.TypeConverter(typeof(System.Web.UI.EmptyStringExpandableObjectConverter))>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Configures the location of a custom implementation of the authentication service.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.AuthenticationServiceManager> class corresponds to the <xref:System.Web.UI.ScriptManager.AuthenticationService%2A> property of the <xref:System.Web.UI.ScriptManager> or <xref:System.Web.UI.ScriptManagerProxy> control.
The authentication Web service is used by AJAX-enabled applications to log on and log off from client script. You can use <xref:System.Web.UI.AuthenticationServiceManager> to provide the path of an alternative implementation of the authentication Web service instead of using the built-in Web service that is provided by the AJAX features of ASP.NET.
To use the authentication service in your application, you must enable it in the configuration file. If you use the built-in authentication Web service, you do not have to explicitly declare the authentication service manager on the page.
To create your own authentication service, you must implement a Web service that has two methods: `Login` and `Logout`. In addition, these methods require the same signature of the built-in authentication Web service.
The following example shows the basic class structure that must be implemented in a custom authentication Web service class.
To use a custom authentication Web service, you can add the service declaratively 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>
```
You can also programmatically configure <xref:System.Web.UI.AuthenticationServiceManager.Path%2A> to use a custom authentication Web service.
Regardless of whether the declarative section for the authentication service is on the page, if the authentication service is enabled in the configuration file, then AJAX-enabled applications will include an ECMAScript (JavaScript) variable in the rendered page. This allows client script to determine whether the current user is authenticated.
]]></format>
</remarks>
<altmember cref="T:System.Web.Configuration.ScriptingAuthenticationServiceSection" />
<related type="Article" href="https://msdn.microsoft.com/library/8290e543-7eff-47a4-aace-681f3c07229b">Web Services in ASP.NET AJAX</related>
<related type="Article" href="https://msdn.microsoft.com/library/c50f7dc5-323c-4c63-b4f3-96edfc1e815e">Using Forms Authentication with ASP.NET AJAX</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public AuthenticationServiceManager ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.AuthenticationServiceManager.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 AuthenticationServiceManager();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.AuthenticationServiceManager" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Path">
<MemberSignature Language="C#" Value="public string Path { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Path" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.AuthenticationServiceManager.Path" />
<MemberSignature Language="VB.NET" Value="Public Property Path As String" />
<MemberSignature Language="F#" Value="member this.Path : string with get, set" Usage="System.Web.UI.AuthenticationServiceManager.Path" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Path { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Extensions</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Category("Behavior")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Category("Behavior")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.NotifyParentProperty(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.NotifyParentProperty(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.UrlProperty]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.UrlProperty>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the path of the authentication service.</summary>
<value>The path of the custom authentication Web service.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Web.UI.AuthenticationServiceManager.Path%2A> property is not set, then the return value is <xref:System.String.Empty?displayProperty=nameWithType>. In this case, the AJAX functionality in ASP.NET will then use the built-in authentication Web service that corresponds to the following internal default path: ~/ScriptServices_AuthenticationService.asmx. The same behavior occurs if you set <xref:System.Web.UI.AuthenticationServiceManager.Path%2A> to an empty value or `null`.
<xref:System.Web.UI.AuthenticationServiceManager.Path%2A> can be specified in the <xref:System.Web.UI.ScriptManager> control or in an associated <xref:System.Web.UI.ScriptManagerProxy> control. When <xref:System.Web.UI.AuthenticationServiceManager.Path%2A> is set at the <xref:System.Web.UI.ScriptManagerProxy> level, the following caveats apply:
- If there are multiple proxies in the control hierarchy, <xref:System.Web.UI.AuthenticationServiceManager.Path%2A> does not have to be set on each proxy instance.
- If <xref:System.Web.UI.AuthenticationServiceManager.Path%2A> is explicitly set on a proxy instance, the value must be the same for all other proxies on which this property is explicitly set.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">More than one unique path was set in the control hierarchy.</exception>
</Docs>
</Member>
</Members>
</Type>