28.12.2013 Views

Building Secure ASP.NET Applications - People Search Directory

Building Secure ASP.NET Applications - People Search Directory

Building Secure ASP.NET Applications - People Search Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

xiv<br />

Contents<br />

How To:<br />

Use Forms Authentication with SQL Server 2000 367<br />

Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368<br />

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368<br />

1. Create a Web Application with a Logon Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368<br />

2. Configure the Web Application for Forms Authentication . . . . . . . . . . . . . . . . . . . . 369<br />

3. Develop Functions to Generate a Hash and Salt value . . . . . . . . . . . . . . . . . . . . . 370<br />

4. Create a User Account Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371<br />

5. Use ADO.<strong>NET</strong> to Store Account Details in the Database . . . . . . . . . . . . . . . . . . . . 372<br />

6. Authenticate User Credentials Against the Database . . . . . . . . . . . . . . . . . . . . . . 373<br />

7. Test the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375<br />

Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376<br />

How To:<br />

Create GenericPrincipal Objects with Forms Authentication 377<br />

Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378<br />

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378<br />

1. Create a Web Application with a Logon Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378<br />

2. Configure the Web Application for Forms Authentication . . . . . . . . . . . . . . . . . . . . 379<br />

3. Generate an Authentication Ticket for Authenticated Users . . . . . . . . . . . . . . . . . . 379<br />

4. Construct GenericPrincipal and FormsIdentity Objects . . . . . . . . . . . . . . . . . . . . . 382<br />

5. Test the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383<br />

Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384<br />

How To:<br />

Implement Kerberos Delegation for Windows 2000 385<br />

Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385<br />

Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386<br />

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386<br />

1. Confirm that the Client Account is Configured for Delegation . . . . . . . . . . . . . . . . 386<br />

2. Confirm that the Server Process Account is Trusted for Delegation . . . . . . . . . . . . 386<br />

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387<br />

How To:<br />

Implement IPrincipal 389<br />

Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390<br />

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390<br />

1. Create a Simple Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390<br />

2. Configure the Web Application for Forms Authentication . . . . . . . . . . . . . . . . . . . . 391<br />

3. Generate an Authentication Ticket for Authenticated Users . . . . . . . . . . . . . . . . . . 392<br />

4. Create a Class that Implements and Extends IPrincipal . . . . . . . . . . . . . . . . . . . . 394<br />

5. Create the CustomPrincipal Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395<br />

5. Test the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397<br />

Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!