Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Configures properties for cookies used by a Web application.
Syntax
class HttpCookiesSection : ConfigurationSection
Methods
The following table lists the methods exposed by the HttpCookiesSection
class.
Name | Description |
---|---|
GetAllowDefinition | (Inherited from ConfigurationSection.) |
GetAllowLocation | (Inherited from ConfigurationSection .) |
RevertToParent | (Inherited from ConfigurationSection .) |
SetAllowDefinition | (Inherited from ConfigurationSection .) |
SetAllowLocation | (Inherited from ConfigurationSection .) |
Properties
The following table lists the properties exposed by the HttpCookiesSection
class.
Name | Description |
---|---|
Domain |
An optional read/write string value that sets the cookie domain name. |
HttpOnlyCookies |
A read/write boolean value. true if output of the System.Web.Configuration.HttpCookiesSection.HttpOnlyCookies property in Internet Explorer 6 SP1 or later is enabled; otherwise, false . The default is false .This property can help mitigate cross-site scripting threats that result in stolen cookies. When a cookie that has HttpOnlyCookies set to true is received by a compliant browser, it is inaccessible to client-side script. Support for this type of cookie was added in Internet Explorer 6 SP1. For more information about possible attacks and how HttpOnlyCookies can help mitigate them, see Mitigating Cross-Site Scripting with HTTP-Only Cookies. |
Location |
(Inherited from ConfigurationSection .) A key property. |
Path |
(Inherited from ConfigurationSection .) A key property. |
RequireSSL |
An optional read/write boolean value. true if Secure Sockets Layer (SSL) communication is required; otherwise, false . The default is false . Note: This setting is overridden by any other feature that exposes the RequireSSL property. |
SectionInformation |
(Inherited from ConfigurationSection .) |
Subclasses
This class contains no subclasses.
Inheritance Hierarchy
HttpCookiesSection
Requirements
Type | Description |
---|---|
Client | - IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF file | WebAdministration.mof |
See Also
ConfigurationSection Class
httpCookies Element (ASP.NET Settings Schema)
System.Web.Configuration.HttpCookiesSection.HttpOnlyCookies Property