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 directory or subdirectory in the application.

  • One or more User Control files bearing the .ascx extension.

  • One or more class files, either for ASP.NET code-behinds or for assemblies used in your application.

  • A /bin directory containing .NET assemblies you wish to use in your application. Assemblies in the /bin directory are automatically made available to your application.

  • ASP.NET Web Applications created in Visual Studio .NET should contain Solution and Project-related files (.sln, .suo, .vbproj, and .csproj, for example), a dynamic ...

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.