/
AnonymousIdentificationSection.xml
527 lines (460 loc) · 34.2 KB
/
AnonymousIdentificationSection.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
<Type Name="AnonymousIdentificationSection" FullName="System.Web.Configuration.AnonymousIdentificationSection">
<TypeSignature Language="C#" Value="public sealed class AnonymousIdentificationSection : System.Configuration.ConfigurationSection" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed AnonymousIdentificationSection extends System.Configuration.ConfigurationSection" />
<TypeSignature Language="DocId" Value="T:System.Web.Configuration.AnonymousIdentificationSection" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class AnonymousIdentificationSection
Inherits ConfigurationSection" />
<TypeSignature Language="F#" Value="type AnonymousIdentificationSection = class
 inherit ConfigurationSection" />
<TypeSignature Language="C++ CLI" Value="public ref class AnonymousIdentificationSection sealed : System::Configuration::ConfigurationSection" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Configuration.ConfigurationSection</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Configures anonymous identification for users that are not authenticated. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.AnonymousIdentificationSection> class allows you to programmatically access and modify the `anonymousIdentification` element of a configuration file.
The purpose of anonymous identification is to assign, at machine and application level, a unique identity to a non-authenticated user. This unique identity can then be used to track the user. Anonymous identification as used in this context does not have any relationship with the identity of the issuer of the Web request or with other security aspects related to the user; it simply assigns a unique identity for tracking purposes and user state management.
Anonymous users are often tracked using the `Session` identifier. The main problems with this approach are the non-uniqueness of the identifier and the overhead involved in storing data to set a `Session` state value, which must be done in order to assign a session identifier to a user. Anonymous identification resolves these problems by providing a unique identifier for each non-authenticated user and not requiring the user to store any data to set the identifier.
## Examples
The following example shows how to obtain the <xref:System.Web.Configuration.AnonymousIdentificationSection> object from the underlying configuration file. You use this object to get or set the related configuration values.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet2":::
]]></format>
</remarks>
<altmember cref="T:System.Web.HttpCookie" />
<altmember cref="T:System.Web.HttpCookieMode" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/75x4ha6s(v=vs.100)">ASP.NET State Management Overview</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/ms178581(v=vs.100)">ASP.NET Session State Overview</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/cc668225(v=vs.100)">Performance Overview</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public AnonymousIdentificationSection ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.AnonymousIdentificationSection.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 AnonymousIdentificationSection();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.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.Configuration.AnonymousIdentificationSection" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.AnonymousIdentificationSection.%23ctor%2A> constructor is not intended to be used directly from your code. It is called by the ASP.NET configuration system. You obtain an instance of the <xref:System.Web.Configuration.AnonymousIdentificationSection> class by using the <xref:System.Configuration.Configuration.GetSection%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Cookieless">
<MemberSignature Language="C#" Value="public System.Web.HttpCookieMode Cookieless { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.HttpCookieMode Cookieless" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.Cookieless" />
<MemberSignature Language="VB.NET" Value="Public Property Cookieless As HttpCookieMode" />
<MemberSignature Language="F#" Value="member this.Cookieless : System.Web.HttpCookieMode with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.Cookieless" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::HttpCookieMode Cookieless { System::Web::HttpCookieMode get(); void set(System::Web::HttpCookieMode value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("cookieless", DefaultValue=System.Web.HttpCookieMode.UseCookies)]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("cookieless", DefaultValue=System.Web.HttpCookieMode.UseCookies)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.HttpCookieMode</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether to use cookies.</summary>
<value>One of the <see cref="T:System.Web.HttpCookieMode" /> values. The default value is <see cref="F:System.Web.HttpCookieMode.UseDeviceProfile" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.AnonymousIdentificationSection.Cookieless%2A> property defines when a cookie should be used to maintain information about the user.
When the <xref:System.Web.Configuration.AnonymousIdentificationSection.Cookieless%2A> property is set to <xref:System.Web.HttpCookieMode.UseCookies>, the user's identifier is stored in a cookie. For more information, refer to <xref:System.Web.HttpCookieMode>.
> [!NOTE]
> ASP.NET stores the user's anonymous identifier within the URI path (that is, it runs in cookieless mode) if the <xref:System.Web.Configuration.AnonymousIdentificationSection.Cookieless%2A> property is set to one of the following values: <xref:System.Web.HttpCookieMode.UseUri>; <xref:System.Web.HttpCookieMode.UseDeviceProfile> when the browser profile indicates that cookies are not supported; or <xref:System.Web.HttpCookieMode.AutoDetect> when the auto-detection process determines that the browser does not support cookies. Finally, if the size of the URI and the anonymous identifier exceeds the allowed length, the anonymous identifier is not applied.
## Examples
The following code example demonstrates how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.Cookieless%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="T:System.Web.HttpCookieMode" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/ms178683(v=vs.100)">ASP.NET Configuration Overview</related>
</Docs>
</Member>
<Member MemberName="CookieName">
<MemberSignature Language="C#" Value="public string CookieName { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string CookieName" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.CookieName" />
<MemberSignature Language="VB.NET" Value="Public Property CookieName As String" />
<MemberSignature Language="F#" Value="member this.CookieName : string with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.CookieName" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ CookieName { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("cookieName", DefaultValue=".ASPXANONYMOUS")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("cookieName", DefaultValue=".ASPXANONYMOUS")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Configuration.StringValidator(MinLength=1)]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.StringValidator(MinLength=1)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the cookie name.</summary>
<value>The name of the cookie. The default value is ".ASPXANONYMOUS".</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example shows how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieName%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet4":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CookiePath">
<MemberSignature Language="C#" Value="public string CookiePath { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string CookiePath" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.CookiePath" />
<MemberSignature Language="VB.NET" Value="Public Property CookiePath As String" />
<MemberSignature Language="F#" Value="member this.CookiePath : string with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.CookiePath" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ CookiePath { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("cookiePath", DefaultValue="/")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("cookiePath", DefaultValue="/")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Configuration.StringValidator(MinLength=1)]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.StringValidator(MinLength=1)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the path where the cookie is stored.</summary>
<value>The path of the HTTP cookie to use for the user's anonymous identification. The default value is a slash (/), which represents the Web application root.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.AnonymousIdentificationSection.CookiePath%2A> property indicates where the authentication cookie resides and is transmitted along with the authentication cookie itself.
## Examples
The following code example shows how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookiePath%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet5":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CookieProtection">
<MemberSignature Language="C#" Value="public System.Web.Security.CookieProtection CookieProtection { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.Security.CookieProtection CookieProtection" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.CookieProtection" />
<MemberSignature Language="VB.NET" Value="Public Property CookieProtection As CookieProtection" />
<MemberSignature Language="F#" Value="member this.CookieProtection : System.Web.Security.CookieProtection with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.CookieProtection" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Web::Security::CookieProtection CookieProtection { System::Web::Security::CookieProtection get(); void set(System::Web::Security::CookieProtection value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("cookieProtection", DefaultValue=System.Web.Security.CookieProtection.Validation)]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("cookieProtection", DefaultValue=System.Web.Security.CookieProtection.Validation)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.Security.CookieProtection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the encryption type used to encrypt the cookie.</summary>
<value>One of the <see cref="T:System.Web.Security.CookieProtection" /> values. The default value is <see cref="F:System.Web.Security.CookieProtection.All" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To improve the protection of your cookie, you may want also set the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieRequireSSL%2A> property to `true`.
Be sure to use the default value for this property if you want both data validation and encryption to help protect the cookie. This option uses the configured data-validation algorithm. Triple-DES (3DES) is used for encryption, if available and if the key is long enough (48 bytes or more).
## Examples
The following code example shows how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieProtection%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet6":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CookieRequireSSL">
<MemberSignature Language="C#" Value="public bool CookieRequireSSL { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CookieRequireSSL" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.CookieRequireSSL" />
<MemberSignature Language="VB.NET" Value="Public Property CookieRequireSSL As Boolean" />
<MemberSignature Language="F#" Value="member this.CookieRequireSSL : bool with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.CookieRequireSSL" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool CookieRequireSSL { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("cookieRequireSSL", DefaultValue=false)]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("cookieRequireSSL", DefaultValue=false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether a Secure Sockets Layer (SSL) connection is required when transmitting authentication information.</summary>
<value>
<see langword="true" /> if an SSL connection is required; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieRequireSSL%2A> is `true`, a compliant browser does not return the cookie unless the connection is over SSL.
> [!NOTE]
> When the anonymous identifier is stored within the URI path, rather than in a cookie, the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieRequireSSL%2A> setting does not affect the behavior of the anonymous identification module. This is consistent with the behavior in forms authentication.
## Examples
The following code example shows how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieRequireSSL%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet7":::
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/eeyk640h(v=vs.100)">ASP.NET Authentication</related>
</Docs>
</Member>
<Member MemberName="CookieSlidingExpiration">
<MemberSignature Language="C#" Value="public bool CookieSlidingExpiration { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CookieSlidingExpiration" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.CookieSlidingExpiration" />
<MemberSignature Language="VB.NET" Value="Public Property CookieSlidingExpiration As Boolean" />
<MemberSignature Language="F#" Value="member this.CookieSlidingExpiration : bool with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.CookieSlidingExpiration" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool CookieSlidingExpiration { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("cookieSlidingExpiration", DefaultValue=true)]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("cookieSlidingExpiration", DefaultValue=true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets whether the cookie time-out value is reset on each request.</summary>
<value>
<see langword="true" /> if the sliding expiration is enabled; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieSlidingExpiration> is set to `true` and less than half of the time specified by the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieTimeout> property remains, for each request issued during a single session, the time interval during which the cookie is valid is reset to <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieTimeout>. When <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieSlidingExpiration> is set to `false`, the cookie expires at a set point in time.
## Examples
The following code example shows how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieSlidingExpiration%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet8":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet8":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CookieTimeout">
<MemberSignature Language="C#" Value="public TimeSpan CookieTimeout { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.TimeSpan CookieTimeout" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.CookieTimeout" />
<MemberSignature Language="VB.NET" Value="Public Property CookieTimeout As TimeSpan" />
<MemberSignature Language="F#" Value="member this.CookieTimeout : TimeSpan with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.CookieTimeout" />
<MemberSignature Language="C++ CLI" Value="public:
 property TimeSpan CookieTimeout { TimeSpan get(); void set(TimeSpan value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("cookieTimeout", DefaultValue="69.10:40:00")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("cookieTimeout", DefaultValue="69.10:40:00")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the amount of time, in minutes, after which the authentication expires.</summary>
<value>The amount of time, in minutes, after which the authentication expires. The default value is 100000.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property can be set to an arbitrarily large value, but internally the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieTimeout%2A> value is limited to a maximum value of two years.
## Examples
The following code example shows how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.CookieTimeout%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet9":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet9":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Domain">
<MemberSignature Language="C#" Value="public string Domain { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Domain" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.Domain" />
<MemberSignature Language="VB.NET" Value="Public Property Domain As String" />
<MemberSignature Language="F#" Value="member this.Domain : string with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.Domain" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Domain { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("domain")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("domain")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the cookie domain.</summary>
<value>The name of the cookie domain. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This attribute allows sharing of the anonymous identification cookie across domains that have a common DNS namespace (for example, all sites that end in "contoso.com"). The following requirements must be met in order for anonymous identification cookies to be shared:
- Sites that want to share the cookie need to have common decryption and validation keys.
- Other anonymous identification configuration attributes such as cookie path and cookie name must be the same for all the sites.
For more information, refer to the <xref:System.Web.HttpCookie> class.
## Examples
The following code example shows how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.Domain%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet10":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet10":::
]]></format>
</remarks>
<altmember cref="T:System.Web.HttpCookie" />
<altmember cref="T:System.Web.HttpCookieMode" />
</Docs>
</Member>
<Member MemberName="Enabled">
<MemberSignature Language="C#" Value="public bool Enabled { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Enabled" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.Enabled" />
<MemberSignature Language="VB.NET" Value="Public Property Enabled As Boolean" />
<MemberSignature Language="F#" Value="member this.Enabled : bool with get, set" Usage="System.Web.Configuration.AnonymousIdentificationSection.Enabled" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool Enabled { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("enabled", DefaultValue=false)]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether anonymous identification is enabled.</summary>
<value>
<see langword="true" /> if anonymous identification is enabled; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If <xref:System.Web.Configuration.AnonymousIdentificationSection.Enabled%2A> is set to `true`, a cookie is used to manage the user's state information.
## Examples
The following code example shows how to access the <xref:System.Web.Configuration.AnonymousIdentificationSection.Enabled%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/CS/AnonymousIdentificationSection.cs" id="Snippet11":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AnonymousIdentificationSection/VB/AnonymousIdentificationSection.vb" id="Snippet11":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Properties">
<MemberSignature Language="C#" Value="protected override System.Configuration.ConfigurationPropertyCollection Properties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Configuration.ConfigurationPropertyCollection Properties" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.AnonymousIdentificationSection.Properties" />
<MemberSignature Language="VB.NET" Value="Protected Overrides ReadOnly Property Properties As ConfigurationPropertyCollection" />
<MemberSignature Language="F#" Value="member this.Properties : System.Configuration.ConfigurationPropertyCollection" Usage="System.Web.Configuration.AnonymousIdentificationSection.Properties" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual property System::Configuration::ConfigurationPropertyCollection ^ Properties { System::Configuration::ConfigurationPropertyCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Configuration.ConfigurationPropertyCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>