This is the most mystifying concept in
asp.net web development because most novice developers think that these both
are same. Because of same steps need to take to create a project or a website.
Website and web application both are different and both have advantage and
disadvantage. But choosing between them is depends on requirement.
Now see the differences step by step:-
ASP.NET Web Application (Web project):
1. In web
application ,all Business logic (classes),configuration files, resources are
placed in the same root directory and compiled into dll.
2. In visual
studio, it is old and default methodology for creation of an application, all
application need to have a project file just like windows application project,
so web project also has a project file called csproj for C# or vbproj for
Vb.net.
3. Web
application creates on project for whole application based on one language you
choose for example :- if you choose c# as your application language then whole project will depend on that
language and you need to add all pages in c# language. You can’t add pages in
vb language. C# language project created in .csproj, and vb language project in
.vbproj extension.
4. Web project
need to pre-compiled before deployment. If any change takes place in any page
then again need to re-compile whole application.
5. Migration
from old version to new is easy in web application. For example- web
application project created in visual studio 2005 can be easily migrate in
visual studio 2008.
6. Web
application should be created when you have a really huge website, large number
of team member.
7. Steps to
create Web application
Open
visual studio àgo to file ànew project
Creating
web application
ASP.NET Website (projectless website)
1. In WebSite,
special folders are available for placing different types of files like classes
can be stored in App_Code directory, which is compiled automatically and can be
accessed throughout the pages in web site.
2. On the other
hand, website pages can be created in multi-programming language like we can add a page using C#
language and Vb on another page in same website.
3. Web site
creation is new methodology added in visual studio, it doesn’t need to have a
project file like .csproj or .vbproj, any file can be created and deployed
easily.
4. Web site
doesn’t need to pre-compiled before deployment. Any change can take place in
.aspx and code- behind and just need to replace old to new page by simply uploading,
not need to worry about compilation. It dynamically compiled and maintained at
runtime.
5. Migration
from old version to new is difficult in web site because of projectless.
6. Web site
should be chosen when you have average website, small number of team member.
7. Steps to
create Web application
Open
visual studio àgo to file ànew website
Creating
web site
Video Reference