FormsAuthenticationConfiguration.Path Propriedade

Definição

Obtém ou define o caminho dos biscoitos.

public:
 property System::String ^ Path { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("path", DefaultValue="/")]
[System.Configuration.StringValidator(MinLength=1)]
public string Path { get; set; }
[<System.Configuration.ConfigurationProperty("path", DefaultValue="/")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Path : string with get, set
Public Property Path As String

Valor de Propriedade

O caminho do cookie HTTP a usar para autenticação. O valor padrão é uma barra (/), que representa a raiz da aplicação Web.

Atributos

Exemplos

O seguinte exemplo de código mostra como aceder à Path propriedade. Consulta o exemplo do código no FormsAuthenticationConfiguration tópico da aula para saberes como obter a secção.

// Get the current Path.
string currentPath = formsAuthentication.Path;
// Set the Path property.
formsAuthentication.Path = "newPath";
' Get the current Path.
Dim currentPath As String = formsAuthentication.Path
' Set the Path property.
formsAuthentication.Path = "newPath"

Observações

A Path propriedade indica onde o cookie de autenticação reside e é transmitido juntamente com o próprio cookie de autenticação.

Aplica-se a

Ver também