Chapter 9
Web Applications

Knowing Web forms inside and out is an important first step on the road to becoming an ASP.NET programmer. But Web forms alone do not an application make. Building full-fledged Web applications like the ones at Amazon, eBay, and other popular Web sites requires infrastructure above and beyond what Web forms provide, including per-user data stores to hold shopping carts and other information that鈥檚 unique to individual users, caching services to boost performance, and security services to identify users and prevent unauthorized accesses. ASP.NET provides all these services and more. Once you know the ropes, ASP.NET lets you build commercial-quality sites in a fraction of the time required by older Web programming technologies such as ASP and CGI.

This chapter is about the facilities that ASP.NET provides for turning Web forms into Web applications. Among other things, you鈥檒l learn about Web.config and Global.asax files and the roles that they play in ASP.NET applications; how to use application state and the ASP.NET application cache to improve performance by caching frequently used data in memory; how to use session state to store per-user data for visitors to your site; and about the various session state configuration options that ASP.NET places at your disposal. You鈥檒l also learn how to build applications that are compatible with Web farms. To top it off, the chapter concludes with a full-blown Web application that brings many of these concepts together under one roof and demonstrates some of the most important principles of ASP.NET-style Web programming.

There鈥檚 a lot to cover, so let鈥檚 get started.