.NET Framework Class Library
FormsAuthenticationCookiesSupported Property

Gets a value that indicates whether the application is configured to support cookieless forms authentication.

Namespace:   System.Web.Security
Assembly:  System.Web (in System.Web.dll)
Syntax
Public Shared ReadOnly Property CookiesSupported As [%$TOPIC/951ce2ca_en-us_VS_110_1_0_0_0_0%]
public static [%$TOPIC/951ce2ca_en-us_VS_110_1_0_1_0_0%] CookiesSupported { get; }
public:
static property [%$TOPIC/951ce2ca_en-us_VS_110_1_0_2_0_0%] CookiesSupported {
	[%$TOPIC/951ce2ca_en-us_VS_110_1_0_2_0_1%] get ();
}
static member CookiesSupported : [%$TOPIC/951ce2ca_en-us_VS_110_1_0_3_0_0%] with get

Property Value

Type: SystemBoolean
false if the application is configured to support cookieless forms authentication; otherwise, true.
Remarks

The CookiesSupported property returns a value based on the CookieMode value and the capabilities of the browser.

  • If the CookieMode property is set to UseCookies, the CookiesSupported property will return true.

  • If the CookieMode property is set to UseUri, the CookiesSupported property will return false.

  • If the CookieMode property is set to AutoDetect, the CookiesSupported property will return true if the browser supports cookies and cookies are enabled; otherwise, the CookiesSupported property will return false.

  • If the CookieMode property is set to UseDeviceProfile, the CookiesSupported property will return true if the Browser for the current Request supports both cookies and redirecting with cookies; otherwise, the CookiesSupported property will return false.

Examples

The following code example sets the cookieless attribute to UseUri in the Web.config file. This configuration will result in the CookiesSupported property returning false.

<authentication mode="Forms">
  <forms loginUrl="member_login.aspx"
    cookieless="UseUri" />
</authentication>
Version Information

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0
Platforms

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.