Web Application Projects
Home Web Application Projects Healthcare Apps Web Application Projects Solutions Web Application Projects Projects
.NET Web Application Projects
This article describes Web application projects and offers information on when you might choose a Web application project. The Web application projects model was designed to provide developers with a project model that more closely resembles the project model for Visual Studio .NET 2003 applications and still makes available all the new features of Visual Studio 2005 and of ASP.NET version 2.0.
Please fill up the form below and we will submit a proposal for your project. Alternatively, you can send email to contact@optionm.net with the project requirements.
Contents
Web Application Projects Overview
Web Application Projects What's New in Web Projects
Web Application Projects Publish Web Application Projects
Web Application Projects Web Pages and Projects
Web Application Projects Compiling Web Application Projects 3.5
Web Application Projects
Web Application Projects
Web Application Projects
Overview
The Web application project type is an alternative to the Web site project type, which is the default project type in Visual Studio 2005.
Web Application Projects Scenarios
The Web application projects model was designed to provide developers with a project model that more closely resembles the project model for Visual Studio .NET 2003 applications and still makes available all the new features of Visual Studio 2005 and of ASP.NET version 2.0. The new Web application project type does not replace the Web site project type introduced in Visual Studio 2005. Instead, it is an alternative project type that you might choose depending on your requirements and your preferred development workflow.
Web Application Projects Note:
Visual Web Developer Express Edition does not support Web application projects.
Only files that are referenced in the solution of a Web application project are part of the project. These files are also displayed in Solution Explorer and are compiled during a build. Because there is a project file, some scenarios are more easily enabled. For instance, you can subdivide one ASP.NET application into multiple Visual Studio projects. Also, you can easily exclude files from the project and from source code.
Alternatively, Web site projects use the folder structure to define the contents of the project. There is no project file in this model and all files in the folder are part of the project.
Use Web application projects when you need to do the following:
Migrate large Visual Studio .NET 2003 applications to Visual Studio 2005.
Control the names of output assemblies.
Use stand-alone classes to reference page- and user-control classes.
Build a Web application by using multiple Web projects.
Add pre-build and post-build steps during compilation.
Background
The new Web application project model provides the same Web project semantics as Visual Studio .NET 2003 Web projects. This includes a structure based on project files and a build model based on a single assembly. In addition, the new project type supports all the new features of Visual Studio 2005 (such as class diagrams, test development, and generics) and of ASP.NET 2.0 (such as master pages, data controls, membership and login, role management, Web Parts, personalization, site navigation, and themes).
The Web application project model in Visual Studio 2005 removes the following two requirements from Visual Studio .NET 2003:
Using FrontPage Server Extensions from Microsoft. These are no longer required, but they are supported if your site already uses them.
Using a local copy of IIS. The new project model supports both IIS and the built-in Visual Studio Development Server.
Installing Web Application Projects
Adding Web application projects to Visual Studio 2005 requires you to install Visual Studio 2005 Service Pack 1 (SP1). Visual Studio 2005 SP1 includes changes to Visual Studio 2005 that enable the Visual Studio Conversion Wizard and the designer to correctly process Web application projects.
Compilation and Build Outputs
The compilation model for Web application projects resembles the Visual Studio .NET 2003 compilation model. All code files (stand-alone, code-behind, and designer class files) in the project are precompiled into a single assembly that is built and persisted by default in the Bin folder. Because this compilation model creates a single assembly, you can specify attributes, such as assembly name and version, and the location of the output assembly.
Deployment
Because all class files are compiled into a single assembly, only that assembly needs to be deployed, along with the .aspx and .ascx files and other static content files. In this model, .aspx files are not compiled until they are run in the browser. However, when used with Web Deployment Projects, the .aspx files can also be compiled and included in a single assembly for deployment.
Each time you deploy the single assembly produced in this model, you replace the code for all pages in the project.
Upgrade from Visual Studio .NET 2003
The similarities between the Web application project model in Visual Studio 2005 and the Web site model in Visual Studio .NET 2003 simplify the upgrade process and minimize any restructuring of the application. For most scenarios, it is preferable to upgrade existing Visual Studio .NET 2003 projects to Web application projects in Visual Studio 2005..
Click here to submit your project requirements to Option Matrix, India.
Back to top
Web Application Projects
What's New in Web Projects
This topic describes how the organization and structure of Web sites have changed from earlier versions of Microsoft Visual Studio.
In Visual Studio .NET 2002 and Visual Studio .NET 2003, Web projects were organized using essentially the same model that was used for client projects (Windows Forms projects). The Web project was based on a model in which the entire project was compiled into a single executable assembly.
In Visual Web Developer, the organization of Web projects has been changed to reflect more accurately the way ASP.NET applications are typically constructed. This topic describes the changes at a high level and provides links to topics that describe new and changed features in more detail.
Types of Web Sites
A significant difference is that you can now create different types of Web sites. Instead of creating only Web sites that run as Internet Information Services (IIS) applications, you can now create the following types:
File-system Web site You can store files in any folder, and you can open and work with any collection of Web pages, no matter where they are located. An important feature is that you do not need to have IIS installed to run pages in a file-system Web site. Instead, you can test your Web sites by using the ASP.NET Development Server, a lightweight test server. FTP Web site You can open and edit Web site files by using the File Transfer Protocol (FTP) directly from within Visual Web Developer.
Local IIS Web site You can continue to create Web sites that run under your local copy of IIS, as you did in earlier versions of Visual Studio. Local IIS Web sites do not require FrontPage Server Extensions.
Remote Web site You can create Web sites that run under IIS on a different computer that is running either FrontPage 2000 Server Extensions or FrontPage 2002 Server Extensions.
Web Site Layout As in earlier versions of Visual Studio, you keep your Web pages in the root of the Web site and in subfolders, as required by your application. However, your Visual Web Developer Web site can contain the following subfolders that have specific characteristics:
App_Browsers folder Contains browser definition files that ASP.NET uses to identify individual browsers and determine their capabilities.
App_Data folder Contains Microsoft Access databases (.mdb files), XML files, and other data stored in local files. The user account that is used to run the application (for example, the local ASPNET account) has permissions to read, write, and create files in this folder. Various ASP.NET application features, such as the providers for membership and roles, as well as the Web Site Administration Tool, are configured to work with the App_Data folder specifically.
Bin folder Contains compiled code, as in earlier versions of Visual Studio. Any classes represented by code in the Bin folder are automatically referenced in your Web site.
App_LocalResources folder Contains .resx files that are bound to a specific page. You can define multiple .resx files for each page, each .resx file representing a different language or language/culture combination.
App_GlobalResource folder Like the App_LocalResources folders, but contains .resx files that are not bound to a specific page. Resource values in .resx files in the App_GlobalResource folders can be accessed programmatically from application code.
App_Code folder Contains source code files. The code is compiled as part of your application and is referenced automatically. The App_Code folder works much like the Bin folder, except that you can put source code in it instead of compiled code. While you are working in Visual Web Developer, the source code in the App_Code folder is compiled dynamically so that IntelliSense can reference any classes defined in the files.
App_Themes folder Contains a collection of files that define the appearance of ASP.NET Web pages and controls. App_Browsers folder Contains .browser files that define browser capabilities.
App_WebReferences folder Contains files used to create a reference to a Web service (in the same project or external to the project), including .disco and .wsdl files. Visual Web Developer does not create these folders by default, except the App_Data folder. In some cases, the folders are created by utilities. For example, running the Generate Local Resource command creates the App_LocalResources folder. In other cases, you can create the folders manually.
Simplified Web Site Templates
When you create a new Web site, the number of files that are created by default is less than it was in earlier versions of Visual Studio. In general, Visual Web Developer creates only the files that you need. As a consequence, a Web site does not initially contain a Web.config file, a Global.asax file, and so on. If you need these files in your Web application, you can add them as new items. Similarly, although ASP.NET treats certain folders specially, the folders are not created by default. Similarly, you can add any additional folders that are required by your application.
Changes in Code-Behind and Single-File Page Models
ASP.NET version 2.0 features a new code-behind model that simplifies the relationship between the .aspx page and its corresponding code. Visual Web Developer also includes complete support for single-file pages.
Changed Build and Deployment Model
In earlier versions of Visual Studio, Visual Studio would build (or compile) your Web site project into a single assembly when you ran a page. In the new project model, you do not need to compile your project before running it. Visual Web Developer now follows the model supported by ASP.NET - pages and their dependent components are compiled individually when they are requested, and the compiled version of the page is cached until the source is changed.
Web Application Projects Note:
By default, Visual Web Developer builds your Web site each time you test it by running it from the designer, and you can explicitly build individual pages or the entire Web site at any time. The purpose of this build process is to help you find compile-time errors, not to produce executable code. The output of this build step is discarded after the build process, and the request compiles the page as normal.
Deployment
The change in build models means that you do not deploy your site by copying a single .dll file and supporting .aspx files. Instead, you copy the entire site, including .aspx files, class files (.vb, .cs, or .jsl files), and other files, all as source files. Deploying sites by copying the source simplifies deployment (because you do not need to copy binary files) and maintenance (because you do not need to recompile the entire site whenever you make a change in a class file).
Visual Web Developer offers several deployment options. You can publish your site, which precompiles the site and then copies the output to a target location. Precompiling for publishing performs the same compilation that would normally occur dynamically at run time, producing binary output. You can precompile the site and replace the .aspx files in your site with stubs that point to the compiled versions of the pages. Alternatively, you can publish the site as an updateable site, which does not compile the .aspx files into stubs, and therefore allows you to change markup and layout without recompiling and republishing. As with building your project in Visual Studio .NET 2003, precompiling helps you catch compilation errors, and because dynamic compilation is not required, precompiling can help reduce the startup time for your site. An important feature of precompiling for publishing is that it can also help protect your site's source code by providing you with an object-only version of the site that you can deploy.
Web Application Projects Note:
The Publish Web Site utility is not available in Visual Web Developer Express Edition.
An alternative to publishing your site by precompiling it is to copy your site to the production server using the Copy Web tool. The Copy Web tool works like an FTP utility, allowing you to copy files to and from a target site and providing the option to synchronize two sites automatically.
Programming Languages
As with Visual Studio .NET 2002, you can create the code for Web pages in a variety of the .NET Framework languages. Because the Web site is not compiled into a single assembly, you can have pages and components that use different programming languages in the same Web site.
Web Server Requirements
You no longer need IIS to test your Web projects. Visual Web Developer includes the ASP.NET Development Server, a Web server that runs on your local computer and can serve (or run) pages. The ASP.NET Development Server accepts requests only from the local computer (localhost), and is therefore both convenient for testing pages on your computer and protected against requests from outside of your computer.
If you create a file-system Web site, when you run your project in Visual Web Developer, Visual Web Developer starts the ASP.NET Development Server and displays the page. (If you are working with a local IIS site, remote site, or an FTP site, Visual Web Developer runs the page by using the version of IIS that is associated with that Web site.)
Project Information Persistence
Visual Web Developer no longer requires a project (.vbproj or .csproj) file for Web sites. A significant benefit of not having a project file is that the site is easier to develop with multiple programmers, since there is no contention for a central project file. In addition, you can open any folder containing Web files as a Web site.
Because Web sites are now file-system based, one of the primary purposes of the project file - to track which files belonged to the project - is no longer necessary. Other information that was tracked in a project file is now stored in the Web.config file. Web sites continue to use solution (.sln and .suo) files to track user-specific configuration information for the site. Visual Web Developer also maintains user-specific information, such as debug information, in the local user folders.
Click here to submit your project requirements to Option Matrix, India.
Back to top
Web Application Projects
Publish Web Application Projects
By publishing a Web application project, Visual Studio compiles the files of a Web application into a single assembly and then copies the compiled assembly to a specified location. ASP.NET Web application projects share the same configuration settings and behavior as standard Visual Studio 2005 class-library projects. You can publish the Web application to a local or shared folder, to an FTP site, or to a Web site that you access by using a URL. The Publish Web dialog box, which is located on the Visual Studio Build menu, enables you to build and publish Web applications. Additionally, you can choose to remove source code from the site. This provides a measure of protection for your intellectual property and makes it more difficult for others to access the source code of your site.
Web Application Projects Note:
The Publish Web dialog box only applies to projects created by using the ASP.NET Web Application template.
Before publishing your Web application, check the configuration of your original site and note the following:
Any settings that must exist at the remote location. Specifically, review settings such as connection strings, membership settings, and other security settings and make sure that that these settings are appropriate for your production environment.
Any settings that must be changed on the published Web site. For example, you might want to disable debugging, tracing, and custom errors after you publish your Web site.
Because configuration settings are inherited, you might need to examine multiple files to find all the applicable settings. Configuration settings can be located in the Machine.config file or the root Web.config file in the SystemRoot\Microsoft.NET\Framework\version\CONFIG directory, in addition to in any Web.config files in your application. If you do not have permission to view the root configuration files, you can output a file that contains a complete list of configuration settings for your Web site, formatted as a standard configuration file,
Web Application Projects Note:
To complete the following procedure, you must have both Create and Write permissions in the target location.
To publish a Web application project
1. On the Build menu, click the Publish ProjectName option.
2. In the Publish Web dialog box, click the ellipsis button (.) to browse to the location to which you want to publish the Web application project.
3. Select either the Replace matching files with local copies check box or the Delete all existing files prior to publish check box.
4. Select how you want to copy the Web application project files to the new location: Only files needed to run this application, All project files, or All files in the source project folder. Also, you can include files from the App_Data folder by selecting the related check box.
5. Click OK to publish your Web application project.
In the task bar, Publish succeeded displays when publishing is completed.
6. Make any configuration changes that are required for your Web application at the target location.
Click here to submit your project requirements to Option Matrix, India.
Back to top
Web Application Projects
Web Pages and Projects
Web Forms pages are one way to create the user interface of an ASP.NET-based Web application. You can add Web Forms pages to several types of Visual Studio projects. Most often, when you want to work with Web Forms pages, you will use the ASP.NET Web Application project template. For more information about Web project templates, see "Simplified Web Site Templates" in What's New in Web Projects.
To work with a Web Forms page in Visual Studio, you use the Web Forms Designer. The designer includes a WYSIWYG view, called Design view, for laying out the elements of the page. Alternatively, you can switch the designer to an HTML view, called Source view, which gives you direct access to the ASP.NET syntax of the elements on the page. Finally, the designer includes a code editor with IntelliSense that you can use to create the page initialization and event-handler code for your page.
Project Files Created With Web Forms
When you create a Web project, Visual Studio constructs a Web application directory structure on the target Web server, and a project structure on your local computer. The following table describes the files that relate to your Web Forms pages.
Web Application Projects Note:
You need to have appropriate privileges on the Web server computer to create and manage Web application files.
Folder Description
WebForm1.aspx and WebForm1.aspx.vb files for Visual Basic Web applications -or- WebForm1.aspx.cs files for Visual C# Web applications These two files make up a single Web Forms page. The .aspx file contains the visual elements of the Web Forms page, for example HTML elements and Web Forms controls. The WebForm1.aspx.vb class file is a hidden, dependent file of WebForm1.aspx. It contains the code-behind class for the Web Forms page, containing event-handler code and the like.
AssemblyInfo.vb files for Visual Basic projects -or- AssemblyInfo.cs for C# projects A project information file (AssemblyInfo.vb or AssemblyInfo.cs file) that contains metadata about the assemblies in a project, such as name, version, and culture information.
Web.config file An XML-based file that contains configuration data on each unique URL resource used in the project.
Global.asax and Global.asax.vb files -or- Global.asax and Global.asax.cs files An optional file for handling application-level events. This file resides in the root directory of an ASP.NET application. The Global.asax.vb class file is a hidden, dependent file of the Global.asax file. It contains the code for handling application events such as the Application_OnError event. At run time, this file is parsed and compiled.
Styles.css file A cascading style sheet (CSS) file to be used within the project.
Deployment
The server on which you create your Web Forms pages is typically not the server on which you will deploy the pages and their associated files for production. To deploy a Web project containing Web Forms pages, you may follow one of two approaches:
Copy your project to the Web server.
Create a deployment project.
For more information about these options, see
Click here to submit your project requirements to Option Matrix, India.
Back to top
Web Application Projects
Compiling Web Application Projects
The Web application project type provides an alternative to the Web site project type that was introduced in Visual Studio 2005. This new project model, which is based on the Visual Studio .NET 2003 Web project model, was created to simplify the conversion of Visual Studio .NET 2003 Web projects to Visual Studio 2005 and to reduce the need for code changes. Code files in the project are precompiled into a single assembly by using the Microsoft Build Engine (MSBuild). ASP.NET Web pages (.aspx) and user controls (.ascx) are compiled dynamically on the server by the ASP.NET compiler.
Compilation Model
The compilation model for Web application projects resembles the Visual Studio .NET 2003 compilation model. All code files (stand-alone, code-behind, and designer class files) in the project are precompiled into a single assembly that is built and persisted by default in the Bin folder. Because this compilation model creates a single assembly, you can specify attributes, such as assembly name and version, and the location of the output assembly.
A Web application project is defined by a project file instead of a project folder, which is used to define a Web site project. The project file contains the files that are included in the project as well as the assembly references and other project metadata settings. Files contained in the project folder that are not defined in the project file will not be compiled as part of the Web application project. Project settings that are added and changed through Visual Studio are reflected in the project file (.*proj) that is generated for each project.
To run and debug pages, you must compile the complete Web application project. Building the complete Web application project can be fast because Visual Studio uses an incremental build model that builds only the files that have changed.
Precompilation of Class Files
Web application projects use MSBuild to precompile class files. These class files are compiled into a single assembly and put in the Bin folder by default. The compilation process can be extended and customized using standard MSBuild extensibility rules.
Web application projects enable you to precompile the classes of an application into a single assembly. The following table describes the types of Web application project class files that are compiled into a single assembly.
Folder Description
Standalone Class files that you can create and add to the Bin folder.
Code behind User-defined code that directly relates to content files.
Designer Code that is auto-generated. You should not modify the designer file.
You can also control the build through the property pages. For example, you can name the output assembly or add pre-build and post-build actions during the build process. Additionally, you can control which class files will be included for compilation based on the Build Action file property.
Customizing Compilation Options
The property pages of Web application projects can be used to modify the compilation characteristics of your Web application. You can specify the output assembly name, version, and other details by using elements of the Application property page of the Project Designer. Use the Build page of the Project Designer to specify the project's build configuration. For instance, you can set the way errors are handled and details about the assembly output. Also, you can add pre-build and post-build steps during compilation by setting values of the Build Events property page of the Project Designer.
Setting the Build Action Property
By default, MSBuild only compiles class files of Web application projects that have the Build Action property set to Compile. However, if a class file is located in the App_Code folder of the Web application project, it will also be compiled by the ASP.NET compiler. This is because the ASP.NET compiler does not support the Build Action property of files that are contained in the App_Code folder. Also, the App_Code folder is not typically included in Web application projects.
Note The App_Code folder exists for Web site projects in Visual Studio 2005. This folder is not typically included in Web Application Projects.
Dynamic Compilation
Although code files in the project are precompiled into a single assembly by using MSBuild, ASP.NET Web pages (.aspx) and user controls (.ascx) of a Web application project are compiled dynamically on the server by the ASP.NET compiler. In a Web application project, Web pages and user controls use the CodeBehind attribute and the Inherits attribute. The CodeBehind attribute points to the code-behind file to use. The Inherits attribute points to a namespace and class in the code-behind file.
Web Application Projects Note:
If you change the root namespace of a Web application project, be sure to update the Inherits attribute in the .aspx page to appropriately match the namespace.
In Web application projects, you can make limited changes to the ASP.NET Web pages in your site after compiling and deploying them. For example, you can change the arrangement of controls, colors, fonts, and other appearance aspects of pages. You can also add controls, as long as they do not require event handlers or other code. When the site first runs, ASP.NET performs additional compilation in order to create output from the markup.
If you need to customize the declaration of a control within a Web application project, you should move the control declaration out of the designer file and into the code-behind file. Moving the declaration of a control to the code-behind file is useful in the following situations:
When the control needs to be typed differently.
When you want a scope for the control other than the default scope.
When you need to add metadata attributes to the declaration of the control.
When you need to write specific XML comments for the declaration of the control.
Deployment
Because all class files are compiled into a single assembly, only that assembly must be deployed, together with the .aspx and .ascx files and other static content files. In this model, .aspx files are not compiled until they requested by the browser. However, when it is used with Web Deployment Projects, which is a downloadable add-in to Visual Studio 2005, the .aspx files can also be compiled and included in a single assembly for deployment.
Click here to submit your project requirements to Option Matrix, India.
Back to top
Option Matrix Featured Case Studies
Option Matrix Whitepapers
Portal for Multi-location Hospital
The client was a healthcare provider (multi-location hospital) for the local resident patients having sleeping disorders. Option Matrix's scope of consulting was for their Seattle,
View Full Details
Health Fitness Portal
Client was establishing a Health Fitness Center at California established in June 2006 by a team of local Antelope Valley residents. It was offered full complement of new and innovative
  View Full Details
Sleep Disorders Hospital Application
This project was the company service portal of "Client" for patients suffering from sleep disorders. It was information about the company, key personnel, HIPPA privacy, education resources,
  View Full Details
Batteries Ecommerce Portal
The objective was to design an e-commerce website for Client to display their catalog of batteries online and collect orders which was forwarded by e-mail to be serviced by a third
  View Full Details
Spices & Herbs Ecommerce Website
The overall purpose of this project was to develop an intuitive and professional spice and herbal ecommerce web site. This web site was accessed by site visitors, members (retail consumers),
  View Full Details
Portal for Web Design Firm
The client, a web design firm located in USA. It positions itself as an idea company and offers services such as website design / development coupled with creative marketing, Internet
  View Full Details
Dynamic Content Portal
The overall purpose of the project was to redesign a database driven dynamic version of the existing site including migration of existing content on the site to the new site design and
  View Full Details
Networking Systems Ecommerce
The USA Based client was one of the leading provider of used and Refurbished Cisco Systems, Extreme Networks, Juniper and Foundry equipment. The client has the experience
  View Full Details
3rd Party Order Fulfillment
This project envisages provision of e-commerce for people in continent B countries who cannot do such transactions in normal course with US based online retailers as shipments
  View Full Details
Multi-lingual Recruiting Portal
This project was for building a specialized job portal for Tourism Schools in Austria. This institutions offer training that enables college students or graduates to get trained for jobs in hotels,
  View Full Details
Corporate Web Portal
The client was focused on providing process control solutions to the manufacturing and related industries. Established in 1989, this Client was a BSI-certified ISO 9001:2000
  View Full Details
Business Community Portal
The overall purpose of this project was to extend the features of existing business community web application meant for New Platform of projects for Team Formation and Expertise Management
  View Full Details
Online Generic Store Portal
This project was intended to be a generic store front that was customized for several clients in the future. The intended objective was to build once and deploy for several clients with easy customization.
  View Full Details
CMS Portal
The overall purpose of the project was to redesign a database driven dynamic version of the existing site including migration of existing content on the site to the new site design
  View Full Details
HR Marketplace
This project has focused on development for Human Resources professionals who was seeking quality, unbiased information necessary to make educated buying decisions while keeping
  View Full Details
Portal for IT Infrastructure Provider
An existing company of the client was looking for development of this project with redevelop the company profile and informational website and requires a graphic redesign along
  View Full Details
Portal for Online Cosmetics Store
This project Development was focused on a pre-launch splash page that would capture email addresses to be used to communicate with consumer & Send confirmation email
  View Full Details
Online Shipment Tracking
Development of this application was taken up to enable the customers to track the status of their shipments for a third party logistics provider and analyze all the information.
  View Full Details
Online Survey Measurement Portal
Client had required a web application for a charitable association which provides funds to a set up 200 or more schools. Client administers survey to monitor the correct usage of funds
  View Full Details
Performance Measurement Portal
The overall purpose of this system was to enable a company's document & its business strategy along with critical success factors and define an information bank with key
  View Full Details
Case Studies A - Z Index
We have Provided a full history of our project Case Studies across all Technologies, Services and Industries.
  View Full Details