ATL Server Tutorial
In this tutorial, you will create a simple online store using ATL Server, a set of native C++ classes for developing XML Web services, Web applications, and other server-based applications. During the course of this tutorial, you will become familiar with the architecture of an ATL Server application and learn how to use many key features of ATL Server.
You will see how to use ATL Server's request and response classes to read data from and write data to the client. You will see how to create Web pages from templates known as server response files that mix static content with calls to generate dynamic content, and you will see how to generate error responses that meet the needs of ATL Server, Internet Information Services (IIS), Web caches, and clients.
The online store will verify that users have logged in with a valid user name and password. If the user attempts to access a page before they have logged in, they will be automatically redirected to the login page. A cookie is used to identify the user's session.
The user's details will be stored in a database. You will see how to load database connection settings from a file and read data from HTML forms submitted to the server. You will also learn how to verify, using ATL Server's cryptographic classes, that a user has provided the correct password without storing the password in the database.
The main page of the store will provide the user with descriptions and prices for the store's products. You will obtain this information from a database using OLE DB consumer attributes. You will learn how to add data to the user's session that will be used to store information about the items in their shopping cart. You will also see how to validate data sent by the client using ATL Server's validation and regular expression support.
When the user makes a purchase, they will receive a confirmation message by e-mail and a performance counter used to track the number of orders will be incremented. You will learn how to use ATL Server's MIME and SMTP support classes to send e-mail, you will see how to use the performance monitor attributes to expose performance counters from your Web application DLLs, and you will discover how to create dynamic services that can be used by any DLL in your application.
You will be exposed to many of the new features of the libraries and development environment provided by Visual Studio .NET, including support for automatically registering Web applications with IIS during the build process.
Before you begin this tutorial, you should read the documentation describing the architecture of an ATL Server application.