18

First of all, when to use what and the overall differences between them has already been answered before. But I couldn't find an answer to this question:

Where can I check if my Visual Studio project is a Web Application or a Web Site?

Niklas
  • 13,005
  • 23
  • 79
  • 119
  • To be perfectly blunt I'm not aware of any major difference. What would that difference be, in your view? THe only thing I can come up with is that a site is something on your _webserver_ (that you can browse) which is after deploying (perhaps from Visual Studio). I have a feeling I'm missing your point though... – sehe Mar 23 '11 at 09:45
  • Web Site uses the .cs files, Web Application gets built into .DLL and run from there. – Chris Dixon Mar 23 '11 at 09:46
  • Do the *Solution Explorer* inside VS contain the exact same files? – Niklas Mar 23 '11 at 09:53

5 Answers5

17

The easiest way to differentiate between Web Site and Web Application is to look at the project's icons.

Web Site

  • has an icon without the used language
  • displays its physical root path
  • does not have a Properties folder

Web Site

Web Application

  • has an icon including the used language
  • displays the project's name
  • has a Properties folder

Web Application

To find out more about the technical differences between them ...

ASP.NET Web Site or ASP.NET Web Application?

Community
  • 1
  • 1
oleschri
  • 2,012
  • 11
  • 21
11

Personally, one tell tale sign for me is whether the project folder actually contains a project file, or not.

You can see the icons differ slightly in VS - a web application has a layered world->docs->language icon and a web site just consists of world->docs.

Also, once opened within VS, right-clicking will display Properties and Property Pages for web applications and web sites respectively; further, on clicking this option you will be greeted with a dialog for the former and MDI tabbed form for the latter - the latter also exposes more functionality to control pre and post build steps and so forth.

A a web application will also display Properties and References special folders as part of the project tree in the Solution Explorer, whereas a web site does not necessarily; unless manually created for some reason (but they still won't be special - web sites use the bin folder for their references).

Grant Thomas
  • 44,454
  • 10
  • 85
  • 129
3

I recently found out (painfully) that web applications do not support Profiles which is not fun. Web sites however do support them and make life much easier. I noticed here people saying there are no major differences. This one is quite major and can make your life difficult if you select to make a web application instead of a web site.

Zalman
  • 31
  • 1
0

Web application and Web Site are VS templates, nothing more. I doubt you will find this information directly somewhere in project. You can try to go through template differences list and guess how this particular project was created.

Snowbear
  • 16,924
  • 3
  • 43
  • 67
0

For Web Site project, once run (F5) you can change the code in the code-behind, the solution will allow it and it will compile on the fly when saved.

A Web Application project, however, will not allow this. This is the simplest way of being able to tell between the two.

Chris Dixon
  • 9,147
  • 5
  • 36
  • 68
  • Yeah, but I thought there would be an easier way than this =/ ? – Niklas Mar 23 '11 at 09:52
  • A Web Site deployment will have .cs files, whereas a Web Application will not - this is another way to tell. But the above solution only takes 20 seconds to do. – Chris Dixon Mar 23 '11 at 09:56