It is a standard requirement for websites to have a user authentication and allow users to see only certain pages. The common method of authentication is to ask for username and password. Here is a good walkthrough article that I tested to create ASP.NET website authentication using the ASP.NET membership services. I suggest you to read through it and follow each step carefully. The tutorial requires Microsoft Visual Web Developer, IIS and SQL Server Express Edition on your local computer, and access to an e-mail server.
This Walkthrough will perform the following tasks:
– Configuring an application to include ASP.NET membership services, and how to define users.
– Using login controls to get user credentials and to display information to logged-in users.
– Protecting one or more pages in your application so that only logged-in users can view them.
– Allowing new users to register at your site.
– Allowing members to change and reset their passwords.