Partager via


FormsAuthenticationConfiguration.Path Propriété

Définition

Obtient ou définit le chemin du cookie.

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

Valeur de propriété

Chemin du cookie HTTP à utiliser pour l’authentification. La valeur par défaut est une barre oblique (/), qui représente la racine de l’application web.

Attributs

Exemples

L’exemple de code suivant montre comment accéder à la Path propriété. Reportez-vous à l’exemple de code dans la FormsAuthenticationConfiguration rubrique de classe pour savoir comment obtenir la section.

// 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"

Remarques

La Path propriété indique l’emplacement du cookie d’authentification et est transmise avec le cookie d’authentification lui-même.

S’applique à

Voir aussi