0

Possible Duplicate:
ASP.net: Website or web application project

Why would someone choose to use a Website Project over a Web Application Project? I find the website project to be quite limiting. Is there some advantage to using it?

Community
  • 1
  • 1
chobo
  • 31,561
  • 38
  • 123
  • 191
  • Dupe of http://stackoverflow.com/questions/590501/difference-between-web-site-and-project-in-visual-studio – stefan Mar 08 '11 at 18:33

4 Answers4

3

Why would someone choose to use a Website Project over a Web Application Project?

No idea. Maybe because he was tricked by this being the default model in VS 2005 and now he has to maintain it?

I find the website project to be quite limiting

Me too.

Is there some advantage to using it?

No.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • thats a pretty biased answer, don't you think? One advantage is that you don't need any sln or proj files to open the website in VS. – Pauli Østerø Mar 08 '11 at 18:41
  • @Pauli Østerø, personally I consider the fact that there is a `.sln` and `.csproj` files as an advantage of web applications against web sites:-) And of course that my answer is biased. I am just basing my answers on my personal experience. – Darin Dimitrov Mar 08 '11 at 18:43
1

When it comes to websites i use Visual Studio mainly as an advanced Notepad with intellisense, and all the things you get in a Web Application Project (WAP) is handled by my build server and continuous integration server. I simply don't need ANY of the features WAP gives me and being able to just open any arbitrary folder as a Website project without needing sln or proj files is a huge relief.

IMO a Web Application Project only gives you some control over the build process inside your own VS instance, but working on big projects with many members its not about the individual anyway, and all the build process management is handled elsewhere than in VS.

Pauli Østerø
  • 6,878
  • 2
  • 31
  • 48
0

Here's an MSDN post comparing the two in detail.

Bala R
  • 107,317
  • 23
  • 199
  • 210
0

The main reasons I use the web site model over web projects:

  • No excess files (.sln, etc) in the directories
  • I can open each application through the IIS directory structure on my machine... Since there are several applications, it makes it easy to reference reusable content ( /images/, /css/, etc) located outside of the application on the site. I don't believe you can do this with projects (since they have no reference point as to where they are on your site).
  • I personally prefer deploying the code files opposed to compiled .dll files (although you can still compile a site to a single dll if you wanted to), as I can see exactly what's in each deployed file if needed in the future. Granted you take a hit whenever the site needs to be compiled, but it's not like that happens constantly. Some people say this is a security issue, since anyone who manages to get access to your server can see your code; however, they could see the code regardless, even if it was compiled.

I think the main reason would be the fact that I can easily reference files located elsewhere on the site like I mentioned, but again, there might be a way to do this in projects as well (I haven't created a "project" in a few years)

John
  • 17,163
  • 16
  • 65
  • 83