AuthenticationSection.Forms Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the Forms element property.
public:
property System::Web::Configuration::FormsAuthenticationConfiguration ^ Forms { System::Web::Configuration::FormsAuthenticationConfiguration ^ get(); };
[System.Configuration.ConfigurationProperty("forms")]
public System.Web.Configuration.FormsAuthenticationConfiguration Forms { get; }
[<System.Configuration.ConfigurationProperty("forms")>]
member this.Forms : System.Web.Configuration.FormsAuthenticationConfiguration
Public ReadOnly Property Forms As FormsAuthenticationConfiguration
Property Value
A Forms element property that contains information used during forms-based authentication.
- Attributes
Examples
The following code example shows how to use the Forms element property.
// Get the current Forms property.
FormsAuthenticationConfiguration currentForms =
authenticationSection.Forms;
// Get the Forms attributes.
string name = currentForms.Name;
string login = currentForms.LoginUrl;
string path = currentForms.Path;
HttpCookieMode cookieLess = currentForms.Cookieless;
bool requireSSL = currentForms.RequireSSL;
bool slidingExpiration = currentForms.SlidingExpiration;
bool enableXappRedirect = currentForms.EnableCrossAppRedirects;
TimeSpan timeout = currentForms.Timeout;
FormsProtectionEnum protection = currentForms.Protection;
string defaultUrl = currentForms.DefaultUrl;
string domain = currentForms.Domain;
' Get the current Forms property.
Dim currentForms _
As FormsAuthenticationConfiguration = _
authenticationSection.Forms
' Get the Forms attributes.
Dim name As String = _
currentForms.Name
Dim login As String = _
currentForms.LoginUrl
Dim path As String = _
currentForms.Path
Dim cookieLess As HttpCookieMode = _
currentForms.Cookieless
Dim requireSSL As Boolean = _
currentForms.RequireSSL
Dim slidingExpiration As Boolean = _
currentForms.SlidingExpiration
Dim enableXappRedirect As Boolean = _
currentForms.EnableCrossAppRedirects
Dim timeout As TimeSpan = _
currentForms.Timeout
Dim protection As FormsProtectionEnum = _
currentForms.Protection
Dim defaultUrl As String = _
currentForms.DefaultUrl
Dim domain As String = _
currentForms.Domain
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET