System.Web.Security.FormsAuthentication Members

The members of System.Web.Security.FormsAuthentication are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the System.Web.Security.FormsAuthentication class.

Public Properties

[read-only]
static
CookieDomainstring.

Gets the value of the domain of the forms-authentication cookie.

[read-only]
static
CookieModeSystem.Web.HttpCookieMode.

Gets a value that indicates whether the application is configured for cookieless forms authentication.

[read-only]
static
CookiesSupportedbool.

Gets a value that indicates whether the application is configured to support cookieless forms authentication.

[read-only]
static
DefaultUrlstring.

Gets the URL that the System.Web.Security.FormsAuthentication class will redirect to if no redirect URL is specified.

[read-only]
static
EnableCrossAppRedirectsbool.

Gets a value indicating whether authenticated users can be redirected to URLs in other Web applications.

[read-only]
static
FormsCookieNamestring.

Gets the name of the cookie used to store the forms-authentication ticket.

[read-only]
static
FormsCookiePathstring.

Gets the path for the forms-authentication cookie.

[read-only]
static
LoginUrlstring.

Gets the URL for the login page that the System.Web.Security.FormsAuthentication class will redirect to.

[read-only]
static
RequireSSLbool.

Gets a value indicating whether the forms-authentication cookie requires SSL in order to be returned to the server.

[read-only]
static
SlidingExpirationbool.

Gets a value indicating whether sliding expiration is enabled.

Public Methods

static
Authenticate(string, string) : bool

Validates a user name and password against credentials stored in the configuration file for an application.

static
Decrypt(string) : FormsAuthenticationTicket

Creates a System.Web.Security.FormsAuthenticationTicket object based on the encrypted forms-authentication ticket passed to the method.

static
Encrypt(FormsAuthenticationTicket) : string

Creates a string containing an encrypted forms-authentication ticket suitable for use in an HTTP cookie.

static
GetAuthCookie(string, bool) : System.Web.HttpCookie

Creates an authentication cookie for a given user name. This does not set the cookie as part of the outgoing response, so that an application can have more control over how the cookie is issued.

static
GetAuthCookie(string, bool, string) : System.Web.HttpCookie

Creates an authentication cookie for a given user name. This does not set the cookie as part of the outgoing response.

static
GetRedirectUrl(string, bool) : string

Returns the redirect URL for the original request that caused the redirect to the login page.

static
HashPasswordForStoringInConfigFile(string, string) : string

Produces a hash password suitable for storing in a configuration file based on the specified password and hash algorithm.

static
Initialize()

Initializes the System.Web.Security.FormsAuthentication object based on the configuration settings for the application.

static
RedirectFromLoginPage(string, bool)

Redirects an authenticated user back to the originally requested URL or the default URL.

static
RedirectFromLoginPage(string, bool, string)

Redirects an authenticated user back to the originally requested URL or the default URL using the specified cookie path for the forms-authentication cookie.

static
RedirectToLoginPage()

Redirects the browser to the login URL.

static
RedirectToLoginPage(string)

Redirects the browser to the login URL with the specified query string.

static
RenewTicketIfOld(FormsAuthenticationTicket) : FormsAuthenticationTicket

Conditionally updates the issue date and time and expiration date and time for a System.Web.Security.FormsAuthenticationTicket.

static
SetAuthCookie(string, bool)

Creates an authentication ticket for the supplied user name and adds it to the cookies collection of the response, or to the URL if you are using cookieless authentication.

static
SetAuthCookie(string, bool, string)

Creates an authentication ticket for the supplied user name and adds it to the cookies collection of the response, using the supplied cookie path, or using the URL if you are using cookieless authentication.

static
SignOut()

Removes the forms-authentication ticket from the browser.