Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The ASP.NET Framework supports three automatic modes of authentication known as Windows authentication, Forms authentication and Passport authentication. Windows authentication means that you build authentication against the built-in authentication system of the Windows operating system. With Forms authentication, you work against a database in which you store user information. And with Passport authentication, you are authenticating users against their passport credentials, a system of user names and passwords that's stored by Microsoft itself.
In this chapter, I'll focus on Forms authentication. The Forms authentication model requires configurations to your website in the web.config file and then creation of the setup pages. In this first step, I'm going to open a website. I'll go to the menu, and select File > Open Web Site and then I'll open the folder Security. Then I'll go to the file web.config. I'll open up the web.config file to full screen by pressing Alt+Shift+Enter. When you first create a website, it's setup with Windows based authentication. Press Ctrl+F for Find, and I'll search for the string authentication, starting with the tag character.
The authentication is set initially with a mode attribute set to Windows. I'll change that value to Forms and save the changes. And click the Full Screen button to return to regular display. Once you have turned on Forms based authentication, you are then ready to create the user interface. In the remaining videos of this chapter, I'll describe creating a login page with Login.aspx and a page to add new users called Signup.aspx. And I'll show you how to add logout functionality through the Application menu.
Get unlimited access to all courses for just $25/month.Become a member