Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Microsoft C# Professional Projects - Premier Press.pdf
Скачиваний:
177
Добавлен:
24.05.2014
Размер:
14.65 Mб
Скачать

578 Project 4 CREATING AN AIRLINE RESERVATION PORTAL

 

Y

L

F

M

 

A

 

E

 

FIGURE 25-3 ConfiguringTauthentication on SQL Server 2000

It is recommended that you use the Mixed Authentication mode to secure the SQL Server. In this way, users need not only to have permissions to manage resources on the SQL Server, but also to know SQL Server logon credentials to manage the resource.

Summary

Authentication for ASP.NET applications can be configured on IIS and in the Web.Config file. IIS supports Basic, Integrated, Windows, and Digest authentication, whereas ASP.NET supports Forms, Passport, and Windows authentication.

To configure the authentication mechanism on IIS, you use SQL Server Enterprise Manager. To configure application security, you need to set the authentication mode to forms in the Web.Config file. You also need to restrict access to anonymous users.

Team-Fly®

SECURING THE APPLICATION

Chapter 25

579

 

 

 

 

After configuring the Web.Config file, you can use the methods of the GetAuth-

Cookie or RedirectFromLoginPage methods of the FormsAuthentication class to

generate an authentication ticket for a user. Finally, you can remove the authentication ticket by using the SignOut method when the user logs off from the Web application.

SQL Server offers two authentication modes, Windows and Mixed. For enhanced security, you should implement the Mixed Authentication mode.

This page intentionally left blank

Chapter 26

Deploying

the Application