ASP.NET Security Tutorials

How to hash ASP.NET Forms Authentication passwords in web.config in VB.NET

Forms authentication offers the possibility of storing the password in different formats. In the <credentials /> configuration section of the <forms /> element, the format of the password is specified through the passwordFormat attribute, which has three valid values:

–  Clear – The passwords are stored as clear text in the <user /> …

Learn more

How to hash ASP.NET Forms Authentication passwords in web.config in C#

Forms authentication offers the possibility of storing the password in different formats. In the <credentials /> configuration section of the <forms /> element, the format of the password is specified through the passwordFormat attribute, which has three valid values:

– Clear – The passwords are stored as clear text in the <user /> …

Learn more

How to create a Forms Authentication logout page in ASP.NET in VB.NET

You can create a Forms Authentication logout page by creating a logout button and calling the FormsAuthentication.SignOut() method, as shown here:

Protected Sub SignOutAction_Click(sender As Object, e As EventArgs)

FormsAuthentication.SignOut()

FormsAuthentication.RedirectToLoginPage()

End Sub

When you call the SignOut() method, you remove the authentication cookie. Depending on the application, you can redirect …

Learn more

How to create a Forms Authentication logout page in ASP.NET in C#

You can create a Forms Authentication logout page by creating a logout button and calling the FormsAuthentication.SignOut() method, as shown here:

protected void SignOutAction_Click(object sender, EventArgs e)

{

FormsAuthentication.SignOut();

FormsAuthentication.RedirectToLoginPage();

}

When you call the SignOut() method, you remove the authentication cookie. Depending on the application, you can redirect the user to another page when the user logs …

Learn more

How to create a Forms Authentication custom login page in ASP.NET in VB.NET

When you want to implement Forms Authentication in your web application you have to create a custom login page. This page collects user name and password from the user and validates them against the credentials stored in the credential store. You can store credentials in web.config as described in the article How to use web.config as …

Learn more

How to create a Forms Authentication custom login page in ASP.NET in C#

When you want to implement Forms Authentication in your web application you have to create a custom login page. This page collects user name and password from the user and validates them against the credentials stored in the credential store. You can store credentials in web.config as described in the article How to use web.config as …

Learn more

How to restrict access to Anonymous Users with Forms Authentication in ASP.NET

From practical point of view, you do not need to restrict access to pages in order to use authentication. In this article will be demonstrated the redirection functionality of forms authentication. This functionality forces ASP.NET to redirect anonymous users to the login page. You can use the simple technique of denying access to all unauthenticated users. …

Learn more

How to configure Forms Authentication in ASP.NET

You can configure forms authentication in your web.config file. Every web.config file includes the <authentication /> configuration section and you have to configure this section with the values Forms:

<authentication mode=”Forms”>

<!– Detailed configuration options –>

</authentication>

The <authentication /> configuration is limited to the top-level web.config file of your application. If the mode attribute …

Learn more

Forms authentication classes in ASP.NET

The FormsAuthenticationModule is the most important part of the forms authentication framework. The module is an HttpModule class that detects existing forms authentication tickets in the request. If the ticket is not available and the user requests a protected resource, it automatically redirects the request to the login page configured in your web.config file before this …

Learn more