Sunday, January 20, 2013

ASP.NET Security: Members of the FormsAuthentication Class

A read-only property that provides the name of the forms authentication cookie.

A read-only property that provides the path set for the forms authentication cookie.

Checks a user name and password against a list of accounts that can be entered in the web.config file.

Logs the user into an ASP.NET application by creating the cookie, attaching it to the current response, and redirecting the user to the page originally requested.

Logs the user out of the ASP.NET application by removing the current encrypted cookie.

Logs the user into an ASP.NET application by creating and attaching the forms authentication cookie. Unlike the RedirectFromLoginPage() method, it doesn’t forward the user back to the initially requested page.

Provides the URL of the originally requested page. You could use this with SetAuthCookie() to log a user into an application and make a decision in your code whether to redirect to the requested page or use a more suitable default page.

Creates the authentication cookie but doesn’t attach it to the current response. You can perform additional cookie customization and then add it manually to the response.

Encrypts a string of text using the specified algorithm (SHA1 or MD5). This hashed value provides a secure way to store an encrypted password in a file or database.

No comments:
Write comments
Recommended Posts × +