AnonymousIdentificationSection.Cookieless Propriedade

Definição

Obtém ou define um valor que indica se os cookies devem ser usados.Gets or sets a value indicating whether to use cookies.

public:
 property System::Web::HttpCookieMode Cookieless { System::Web::HttpCookieMode get(); void set(System::Web::HttpCookieMode value); };
[System.Configuration.ConfigurationProperty("cookieless", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public System.Web.HttpCookieMode Cookieless { get; set; }
[<System.Configuration.ConfigurationProperty("cookieless", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
member this.Cookieless : System.Web.HttpCookieMode with get, set
Public Property Cookieless As HttpCookieMode

Valor da propriedade

HttpCookieMode

Um dos valores de HttpCookieMode.One of the HttpCookieMode values. O valor padrão é UseDeviceProfile.The default value is UseDeviceProfile.

Atributos

Exemplos

O exemplo de código a seguir demonstra como acessar a Cookieless propriedade.The following code example demonstrates how to access the Cookieless property.

// Get Cookieless.
System.Web.HttpCookieMode cookieless =
    anonymousIdentificationSection.Cookieless;
Console.WriteLine("Cookieless: {0}",
          cookieless);
' Get Cookieless.
Dim cookieless _
As System.Web.HttpCookieMode = _
anonymousIdentificationSection.Cookieless
Console.WriteLine("Cookieless: {0}", cookieless)

Comentários

A Cookieless propriedade define quando um cookie deve ser usado para manter informações sobre o usuário.The Cookieless property defines when a cookie should be used to maintain information about the user.

Quando a Cookieless propriedade é definida como UseCookies , o identificador do usuário é armazenado em um cookie.When the Cookieless property is set to UseCookies, the user's identifier is stored in a cookie. Para obter mais informações, consulte HttpCookieMode.For more information, refer to HttpCookieMode.

Observação

O ASP.NET armazena o identificador anônimo do usuário dentro do caminho do URI (ou seja, é executado no modo sem cookie) se a Cookieless propriedade for definida como um dos seguintes valores: UseUri ; UseDeviceProfile quando o perfil do navegador indicar que não há suporte para cookies; ou AutoDetect quando o processo de detecção automática determinar que o navegador não oferece suporte a cookies.ASP.NET stores the user's anonymous identifier within the URI path (that is, it runs in cookieless mode) if the Cookieless property is set to one of the following values: UseUri; UseDeviceProfile when the browser profile indicates that cookies are not supported; or AutoDetect when the auto-detection process determines that the browser does not support cookies. Por fim, se o tamanho do URI e o identificador anônimo excederem o comprimento permitido, o identificador anônimo não será aplicado.Finally, if the size of the URI and the anonymous identifier exceeds the allowed length, the anonymous identifier is not applied.

Aplica-se a

Confira também