Export (0) Print
Expand All

HttpCookiesSection.HttpOnlyCookies Property

This property supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Gets or sets a value indicating whether the support for the browser's HttpOnly cookie is enabled.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public:
property bool HttpOnlyCookies {
	bool get ();
	void set (bool value);
}
/** @property */
public boolean get_HttpOnlyCookies ()

/** @property */
public void set_HttpOnlyCookies (boolean value)

public function get HttpOnlyCookies () : boolean

public function set HttpOnlyCookies (value : boolean)

Not applicable.

Property Value

true if support for the HttpOnly cookie is enabled; otherwise, false. The default is false.

The httpCookies element supports the use of HttpOnly cookies. HttpOnly cookies (cookies with the HttpOnly attribute) were introduced in Internet Explorer 6 to help mitigate the risk of cross-site scripting. The HttpOnly attribute prevents cookies from being accessed through client-side script. Any information contained in an HttpOnly cookie is less likely to be disclosed to a hacker or a malicious Web site. For more information, search MSDN (msdn.microsoft.com) for "HttpOnly."

The following code example shows how to use the HttpOnlyCookies property.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft