ASP.NET Web Application Project (WAP) vs Website

Recently, we moved a fairly large web application to Website project. This is a very old decision point that we have moved back and forth a few times. A Bing search shows 2 well written entries early in the list:

Here is how we reach the current decision:

  • Back to VS2002/VS2003, it was WAP. No choice.
  • In VS2005, it was website. No choice initially until WAP was added back to VS2005.
  • In VS2008, we moved to WAP. The main reason was that website projects does not have a project file to store assembly and project references. The project reference is stored in the solution file. The reference to GAC assembly was stored in the web.config and the non-GAC DLL reference is through a bunch .refresh files that points to the location of DLL files (library). This makes checking in solution file into version control important.This system is fragile and breaks easily.
  • Now we are moving back to Website. We understand website reference mechanism better now so it is less frustrating. In WAP, the entire code-behind is compiled into a single DLL. In website, it can be much granular so it works better in industries (such as financial) that requires clean audit-trail of artifacts. We have several thousands of web pages. WAP will requires us to compile the entire application before debugging while we can compile just a single page with Website. In general, with the adoption of MVVM, most of the business logic now resides in separate library DLLs so we do not have much code other than the data-binding code left in the code-behind. This allows us to have a fine control on the granularity of compilation and deployment units.

2 Comments

  • I've always used the Website type because I've always had issues with the Web Application Project project and solution files with source control. Even with VS.net 2002/2003 I avoided the WAP and used things like Dreamweaver and Webmatrix 1 to create web sites.

    I also don't like in WAP that my project has a dependency on a certain version of VS.net since sln files only work with 1 version of VS.net.

    I also do not like that in a WAP there are files that can be in your directory structure, but not included in the project. I like knowing that every file in my directory structure is part of the project.

    But, I know most people use and recommend the WAP way.

  • Hi,

    I found the backlash against website projects strange after VS 2005 was launched. I personally found it a great simplification and believed it would help bring more of the PHP/PERL types over to .NET.

    When migrating some large projects from VS 2003 (before the WAP plugin was released for VS 2005) I did have some issues, but mostly with bad architecture on our side(where say someone was calling a static method on another ASPX page, which worked fine when everything was compiled into a single DLL. So the website model actually promoted a better architecture and probably stopped people doing 'quick fixes/hacks', and forced developers to refactor code correctly (into either a separate project/DLL or at least putting shared code into App_Code.

    Both models have their place. Obviously the move to WAP was partly a reflection on the issues some people were having converting their projects from VS 2003 when VS 2005 was first launched. But I still really really like what Microsoft did with website projects and find it sad that it was not seem as something 'real developers' use. We use it for complex projects with many thousands of pages.

    Some people forget that even ASP.NET 1.0 supported a similar model to website projects (maybe apart from not having the nice App_Code addition with .NET 2). It was just that Visual Studio.NET in 2002 never supported the model. So unless you were using notepad, you were guided into the web application project model for .NET 1.0 and 1.1 (Visual Studio .NET and Visual Studio 2003).

Comments have been disabled for this content.