Compartir por


FormsAuthenticationConfiguration.Path Propiedad

Definición

Obtiene o establece la ruta de acceso de la 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

Valor de propiedad

Ruta de acceso de la cookie HTTP que se va a usar para la autenticación. El valor predeterminado es una barra diagonal (/), que representa la raíz de la aplicación web.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo acceder a la Path propiedad . Consulte el ejemplo de código del tema de clase FormsAuthenticationConfiguration para obtener información sobre cómo obtener la sección.

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

Comentarios

La Path propiedad indica dónde reside la cookie de autenticación y se transmite junto con la propia cookie de autenticación.

Se aplica a

Consulte también