System.Web.Security.FormsAuthentication: Method Members

The methods of System.Web.Security.FormsAuthentication are listed below. For a list of all members, see the FormsAuthentication Members list.

See Also: Inherited members from System.Object

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.