Javatpoint Logo
Javatpoint Logo

ASP.NET Web Forms Authentication

In this tutorial, we will discuss about how to create a secure Web Forms application with user registration and login. We are using Visual Studio to create the application. This example includes the following steps.

  1. Create a Web Forms project
  2. Create a project in visual studio as we are doing below.

    ASP Authentication 1

    Select Web Forms Template

    ASP Authentication 2
  3. Set Authentication for the Project
  4. Click on Change Authentication button and select Authentication type.

    ASP Authentication 3
  5. Enable SSL for the Project
  6. Secure Sockets Layer (SSL) is a protocol defined to allow Web servers and Web clients to communicate more securely through the use of encryption

    In Solution Explorer, click on the project and press F4 to display the Properties window. Now, change SSL Enable property to true.

    ASP Authentication 4
  7. Set Project URL
  8. In Solution Explorer, right click on the project and select properties. It will pop up a window like below.

    ASP Authentication 5

    Set Project URL, it should be similar to the SSL URL. After setting save it by using CTRL+S.

  9. Run Project
  10. After enabling SSL, now run application. It may ask to install IIS Express SSL certificate then install it and let application run.

    It will produce the following output.

    ASP Authentication 6

    This application has two more links Register and Login on the upper right corner. Now, a user can register and login to the application. This feature makes application more secure.

  11. User Registration
  12. To register, click on the Register link and fill registration details.

    ASP Authentication 7

    After successful registration it shows home page with user login status.

  13. User Login
  14. Now, registered user can login to the application.

    ASP Authentication 8

    After login, it shows home page with login status.

    ASP Authentication 9

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA