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 .