3

When I start a new ASP.NET project in Visual Studio 2010, I can either create a new ASP.NET Web Site or an ASP.NET Web Application.

What's the difference between these two project types? Why would I choose one over the other?

Please note: this question is an exact duplicate of this one, but I'm asking specifically about Visual Studio 2010 (there are no answers targeted at VS 2010 in the original question). So are the answers of the other question still valid or are there any changes with VS2010 which results in different answers?

Community
  • 1
  • 1
M4N
  • 94,805
  • 45
  • 217
  • 260
  • 1
    possible duplicate of [ASP.NET: Web Site or Web Application?](http://stackoverflow.com/questions/398037/asp-net-web-site-or-web-application) - the answer is the same, marked as dupe so people fine the original – John Farrell Sep 29 '10 at 18:20
  • 3
    The answers to the other question are still valid, there are no changes in VS2010 support for websites and webapps. – Max Toro Sep 29 '10 at 18:27
  • Possible duplicate of [ASP.NET Web Site or ASP.NET Web Application?](https://stackoverflow.com/questions/398037/asp-net-web-site-or-asp-net-web-application) – Lex Li Oct 18 '18 at 22:37

3 Answers3

1

I just want to give an example that website means its a site by which we can get some information. they will be a collection of websites in a Web Application. Example take any company site. And coming to web Application the best example is Gmail. which is an application . which we use. This is the general difference between these two. Even it may also contain a collection of websites. But depending on the Requirement.

upendra
  • 11
  • 1
0

I know this question is a bit old, but just in case someone finds it.. I believe that if you want to use Web.config Transformations (useful if you want to have different setting's for development and release) then you need to be using a web application.

Technically this is probably a result of the same differences as in 2008 between a web site project or a web application project, but being that it's a new feature in vs 2010 (at least built in, i think you can get it in vs 2008 also) it's at least one new difference from vs 2008 to vs 2010 to consider when choosing which way to go.

Community
  • 1
  • 1
Jack
  • 10,943
  • 13
  • 50
  • 65
0

I would recommend website only for a very simple/small application. Build times are higher, you cannot use nuget, there are no namespaces (although aspx and ascx class names can be pretty cool), no conditional compilation symbols, no immediate code tests (since there's no a single .dll to be referenced), etc.

In more complex scenarios the way to go is web application.

AlfredoRevilla-MSFT
  • 3,171
  • 1
  • 12
  • 18
  • With all those disadvantages, I wonder why your conclusion is still recommendation on website. Anyway ASP.NET 4.x is dying, and ASP.NET Core will take over, so any discussion like this becomes meaningless. – Lex Li Oct 18 '18 at 22:38
  • Updated it to make it clearer. Also I don't think it is meaningless, there're a lot of websites out there that may need manteinance thus to use websites will be useful. – AlfredoRevilla-MSFT Oct 18 '18 at 22:42