ASP.NET Web Application Template
The ASP.NET Web Application project template is used to create an ASP.NET Web application on a computer that has Internet Information Services (IIS) version 5.0 or later installed. The template creates the basic files needed on the server to help you start designing your application. For an overview of Web applications, see Introduction to ASP.NET Web Applications in Visual Studio.
Requirements
You must have:
- A computer with IIS, version 5.0 or later, installed locally or on a remote server.
- If you want to use FrontPage Server Extensions as your access method, the server extensions must also be installed on that computer. For more information, see Web Access Methods.
- You must have the correct Web permissions settings for your application. For more information, see Web Application Security at Design Time in Visual Studio.
Files and References Added by the Template
The template automatically adds the essential project references and files to use as a starting point for your application:
- AssemblyInfo (.vb file for Visual Basic or .cs file for Visual C#) - Used to describe the assembly and specify versioning information. For more information, see Programming with Assemblies.
- Global.asax - Contains code for responding to application-level events raised by ASP.NET. For more information, see The Global.asax File.
- Styles.css - Contains default HTML style settings. For more information, see Working With CSS Styles.
- Web.config - Contains application settings for the ASP.NET application. For more information, see Application Configuration Files.
- WebForm1.aspx - Contains the portion of the default Web Forms page containing UI elements (controls), similar to an HTML page. For more information, see Web Forms Pages.
- Webform1 (.vb file for Visual Basic or .cs file for Visual C#) - Contains a class file for the default Web Forms page that contains the system-generated and user code for the page. For more information, see Web Forms Pages.
- References to these .NET Framework namespaces:
- System - Contains fundamental classes and base classes that define commonly used values and reference data types, events and event handlers, interfaces, attributes, and processing exceptions.
- System.Data - Contains classes that constitute the ADO.NET architecture, which is the primary data access method for managed applications.
- System.Drawing - Contains classes that provide access to GDI+ basic graphics functionality.
- System.Web - Contains classes and interfaces that enable browser/server communication.
- System.Xml - Contains classes that provide standards-based support for processing XML.
Comparison of Web Application and Web Service Templates
Both the ASP.NET Web Application and ASP.NET Web Service templates include the core references needed to create an application that accesses both Web and data technologies. The main difference between these two templates is the use for which each project type is intended. A Web application is used to create an environment with which users can visually interact through a Web browser, while an XML Web service is used to publish a service that applications can call upon to perform a task and return a value.
The primary structural difference between a Web application and a Web service is the use of ASP.NET Web Forms technology. When the ASP.NET Web Application template creates a project, it includes a Web Forms page, a Styles.css file for storing default HTML settings, and references the System.Drawing namespace. These items are the building blocks for creating interactive Web documents that users can access from a remote computer with a Web browser. For more information, see Introduction to ASP.NET Web Applications in Visual Studio.
The ASP.NET Web Service template does not provide a Web Forms page, but instead includes a service (.asmx) file. This text file serves as the addressable entry point for the XML Web service. It references code in pre-compiled assemblies, a code-behind file, or code contained in the .asmx file itself.
See Also
ASP.NET Web Service Template | Web Forms Pages and Projects in Visual Studio | Working with Web Projects | Web Walkthroughs | File Types and File Extensions in Visual Basic and Visual C# | Web Namespaces in Visual Studio