
22
|
Chapter 2: ASP.NET Applications
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Application Structure and Boundaries
Although it is convenient, for the sake of discussing application types, to divide
ASP.NET applications into web applications and web services, the truth is that
from a practical standpoint, ASP.NET applications can be comprised of both
types; an ASP.NET Web Application may contain .asmx files that implement web
services, and a web service application may contain .aspx files that implement user
interfaces for web services or functionality contained in .NET assemblies. Thus,
from the standpoint of application structure, ASP.NET Web Applications and
ASP.NET Web Services are quite similar.
Application Structure
The structure of an ASP.NET application consists of a site or virtual directory in
IIS and at least one ASP.NET page or web service. Optionally, each ASP.NET
application may have:
• A single global.asax file, located in the root of the application.
• One or more web.config files. There can be only one web.config file per direc-
tory or subdirectory in the application.
• One or more User Control files bearing the .ascx extension.
Figure 2-2. Output of a simple web service