views:

741

answers:

5

which VS template should be used for a ASP.NET website, the website template or the project | webapplication template.

A: 

I prefer a website. A website is a collection of files in a directory. It becomes more portable and deployable. A web application clouds the issue with a project file.

Rick Kierner
+1  A: 

you'd better read this: http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx in my opinion it depends on what you are developing

+2  A: 

Web application projects works more like a traditional VS project, which has a project file, is compiled in one step and so on.

Web site projects works more like classic ASP or PHP-sites. There is no project file (references are stored in the solution file), and pages are recompiled dynamically on the server. The nice thing with web sites is that you can just ftp to the server and change a file in a text editor. You dont need VS. Some may hate that, though.

It probably depends on your background. If you are used to ASP or PHP style development, web site projects will seem more natural to you. If you have a traditional application developer background, web application projects will seem more natural.

JacquesB
A: 

Personally I use web application projects exclusively now. I actually converted a rather web site to a web application because of compilation times for the web site.

I also use pre-build events to move configuration specific configuration files around and pre-build and post-build events are not available in web sites.

Min
+2  A: 

If you're using Team Foundation Server for source control, you'll probably have to use a Web Application Project, as you need a .csproj file.

There are more details from Jeff Atwood himself: Web Site Projects vs. Web Application Projects

Web Site web projects are particularly painful in Team System due to the lack of a physical file that contains project information and metadata. For example, it's impossible to check in code analysis rules on Web Site projects, because the code analysis rules are stored entirely on the client!

tjrobinson