Comparteix a través de


FormsAuthenticationConfiguration.Path Propiedad

Definición

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

String

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

Atributos

Ejemplos

El siguiente ejemplo de código muestra cómo obtener acceso a la propiedad Path. 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