Thursday, May 29, 2014

What is the difference between Web Application Projects and Web Site Projects in Visual Studio? Asp.net

I was creating new web project and was thinking that which one is better choice? Web Application or Web Site to build web project. I have found following scenarios on both. So based on these scenarios, you can decide which one is perfect match for your web project.

Scenarios in which web application projects are the preferred choice include the following:

•You want to be able to use the Edit and Continue feature of the Visual Studio
 debugger. 

•You want to run unit tests on code that is in the class files that are associated
 with ASP.NET pages.

•You want to refer to the classes that are associated with pages and user controls 
 from standalone classes.

•You want to establish project dependencies between multiple web projects.

•You want the compiler to create a single assembly for the entire site.

•You want control over the assembly name and version number that is generated for the
 site.

•You want to use MSBuild or Team Build to compile the project. For example, you 
 might want to add prebuild and postbuild steps.

•You want to avoid putting source code on a production server.


Scenarios in which Web site projects are the preferred choice include the following:

•You want to include both C# and Visual Basic code in a single web project. 
 (By default, a web application is compiled based on language settings in 
 the project file. Exceptions can be made, but it is relatively difficult.)

•You want to open the production site in Visual Studio and update it in real time
 by using FTP.

•You do not want to have to explicitly compile the project in order to deploy it.

•If you do precompile the site, you want the compiler to create multiple assemblies 
 for the site, which can include one assembly per page or user control, or one 
 or more assemblies per folder.

•You want to be able to update individual files in production by just copying 
 new versions to the production server, or by editing the files directly on 
 the production server.

•If you precompile the site, you want to be able to update individual ASP.NET 
 web pages (.aspx files) without having to recompile the entire site.

•You like to keep your source code on the production server because it can serve 
 as an additional backup copy.

No comments:

Post a Comment

React-select is very slow on larger list - Found solution - using react-window

 I had more than 4000 items in searchable dropdownlist. I have used react-select but it was very slow. finally I found complete solution to ...