Overview of the Login Controls

You won’t have any fun using the Login controls unless you have confidential information to protect. Therefore, let’s start by creating a page that needs password protection.

Create a new folder in your application named SecretFiles and add the page in Listing 26.1 to the SecretFiles folder.

Listing 26.1. SecretFiles\Secret.aspx

images

There is nothing special about the page in Listing 26.1. It just displays the message This Page is Secret!.

To password-protect the Secret.aspx page, you need to make two configuration changes to your application: You need to configure both authentication and authorization.

First, you ...

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.