ASP. NET 2.0-web site vs Web Application Project

Source: Internet
Author: User
Ref: http://maordavid.blogspot.com/2007/06/aspnet-20-web-site-vs-web-application.html

A common question by Asp.net developers is what project model shoshould I use for Asp.net application? Web Site Project (which introduced with VS 2005) or web application project (which delivered as add-in for VS 2005 and built-in within VS 2005 SP1 )?

There is no thumb rule. every project model has it's own advantages (and diss-advantages off course ...). I hope this post will help you to understand better the differences between 2 of them.

Web application project model

    • Provides the same web project semantics as Visual Studio. NET 2003 web projects.
    • Has a project file (structure based on project files ).
    • Build model-all code in the project is compiled into a single assembly.
    • Supports both IIS and the built-in ASP. NET development server.
    • Supports all the features of Visual Studio 2005 (refactoring, generics, etc.) and of ASP. NET 2.0 (master pages, membership and login, site navigation, themes, etc ).
    • Using FrontPage Server Extensions (FPSE) are no longer a requirement.

Web Site Project Model

    • No project file (based on file system ).
    • New compilation model. (read here or here for more details) and...
    • Dynamic compilation and working on pages without building entire site on each page view.
    • Supports both IIS and the built-in ASP. NET development server.
    • Each page has it's own assembly.
    • Defferent code model. (read here for more details)

OK, all is great, but you want to create your web site now. Which model shocould you use?

    • you need to migrate large Visual Studio. NET 2003 applications to VS 2005? Use the Web application project .
    • you want to open and edit any directory as a web project without creating a project file? Use Web site project .
    • you need to add pre-build and post-build steps during compilation? Use Web application project .
    • you need to build a web application using multiple web projects? Use Web application project .
    • you want to generate one assembly for each page? Use Web site project .
    • you prefer dynamic compilation and working on pages without building entire site on each page view? Use Web site project .
    • you prefer single-page code model to code-behind model? Use Web site project .
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.