Condividi tramite


FormsAuthenticationConfiguration.Path Proprietà

Definizione

Ottiene o imposta il percorso del 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

Valore della proprietà

Percorso del cookie HTTP da usare per l'autenticazione. Il valore predefinito è una barra (/), che rappresenta la radice dell'applicazione Web.

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato come accedere alla Path proprietà . Fare riferimento all'esempio di codice nell'argomento della FormsAuthenticationConfiguration classe per informazioni su come ottenere la sezione .

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

Commenti

La Path proprietà indica dove risiede il cookie di autenticazione e viene trasmesso insieme al cookie di autenticazione stesso.

Si applica a

Vedi anche