Export (0) Print
Expand All

FormsAuthentication.CookiesSupported 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)

public static bool CookiesSupported { get; }
/** @property */
public static boolean get_CookiesSupported ()

public static function get CookiesSupported () : boolean

Not applicable.

Property Value

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

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.

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>

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