AuthenticationSection.Forms Property


Gets the Forms element property.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public FormsAuthenticationConfiguration Forms { get; }

Property Value

Type: System.Web.Configuration.FormsAuthenticationConfiguration

A Forms element property that contains information used during forms-based authentication.

The following code example shows how to use the Forms element property.

// Get the current Forms property.

FormsAuthenticationConfiguration currentForms = 

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

.NET Framework
Available since 2.0
Return to top