Поделиться через


FormsAuthenticationConfiguration.Path Свойство

Определение

Возвращает или задает путь к файлу 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

Значение свойства

Путь к HTTP-файлу cookie для проверки подлинности. Значение по умолчанию — косая черта (/), представляющая корень веб-приложения.

Атрибуты

Примеры

В следующем примере кода показано, как получить доступ к свойству Path . Ознакомьтесь с примером FormsAuthenticationConfiguration кода в разделе класса, чтобы узнать, как получить раздел.

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

Комментарии

Свойство Path указывает, где находится файл cookie проверки подлинности и передается вместе с самим файлом cookie проверки подлинности.

Применяется к

См. также раздел