AuthenticationSection.Forms Property
.NET Framework (current version)
Gets the Forms element property.
Assembly: System.Web (in System.Web.dll)
[ConfigurationPropertyAttribute("forms")] public FormsAuthenticationConfiguration Forms { get; }
Property Value
Type: System.Web.Configuration.FormsAuthenticationConfigurationA 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 = 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;
.NET Framework
Available since 2.0
Available since 2.0
Show: