FormsAuthentication.CookiesSupported Propriedade
Definição
Obtém um valor que indica se o aplicativo está configurado para dar suporte a autenticação de formulários sem cookies.Gets a value that indicates whether the application is configured to support cookieless forms authentication.
public:
static property bool CookiesSupported { bool get(); };
public static bool CookiesSupported { get; }
member this.CookiesSupported : bool
Public Shared ReadOnly Property CookiesSupported As Boolean
Valor da propriedade
false se o aplicativo estiver configurado para dar suporte à autenticação de formulários sem cookies; caso contrário, true.false if the application is configured to support cookieless forms authentication; otherwise, true.
Exemplos
O exemplo de código a seguir define o cookieless atributo como UseUri no arquivo Web.config.The following code example sets the cookieless attribute to UseUri in the Web.config file. Essa configuração resultará na CookiesSupported Propriedade retornando false .This configuration will result in the CookiesSupported property returning false.
<authentication mode="Forms">
<forms loginUrl="member_login.aspx"
cookieless="UseUri" />
</authentication>
Comentários
A CookiesSupported propriedade retorna um valor com base no CookieMode valor e nos recursos do navegador.The CookiesSupported property returns a value based on the CookieMode value and the capabilities of the browser.
Se a CookieMode propriedade for definida como UseCookies , a CookiesSupported propriedade será retornada
true.If the CookieMode property is set to UseCookies, the CookiesSupported property will returntrue.Se a CookieMode propriedade for definida como UseUri , a CookiesSupported propriedade será retornada
false.If the CookieMode property is set to UseUri, the CookiesSupported property will returnfalse.Se a CookieMode propriedade for definida como AutoDetect , a CookiesSupported propriedade retornará
truese o navegador oferecer suporte a cookies e cookies estiverem habilitados; caso contrário, a CookiesSupported propriedade retornaráfalse.If the CookieMode property is set to AutoDetect, the CookiesSupported property will returntrueif the browser supports cookies and cookies are enabled; otherwise, the CookiesSupported property will returnfalse.Se a CookieMode propriedade for definida como UseDeviceProfile , a CookiesSupported propriedade retornará
truese o Browser para o atual Request oferecer suporte a cookies e redirecionamento com cookies; caso contrário, a CookiesSupported propriedade retornaráfalse.If the CookieMode property is set to UseDeviceProfile, the CookiesSupported property will returntrueif the Browser for the current Request supports both cookies and redirecting with cookies; otherwise, the CookiesSupported property will returnfalse.