Showing posts with label Website vs webproject. Show all posts
Showing posts with label Website vs webproject. Show all posts

April 13, 2011

ASP.NET WebSite Vs WebApplication

 

The 'web site' model was introduced with ASP.NET 2.0, the 'web application' model was the project type of the original .net framework. Web Application project we need to do explicit build.

Web Site lets you treat it like a PHP or classic ASP site, where you can make inline changes that take effect immediately.

Pros

  • You can make tweaks to the site right on the web server
  • Deploying is as simple as copying the folder

Cons

  • If you are not making the changes right on the live site, you can get into change management problems, where you forget to keep all your files in sync
  • You can get runtime syntax errors displayed to your end users, since the only way to check is to manually run every page

For me the personal preference is Web-Application rather than  Web Site as we can get  lot of trouble when we making arbitrary changes to code-behind file in notepad while the website is running.

If it is an ASP.NET Web Application project, then you need to do a build before you post the dll to production and unless we build the files cannot get updated. This is more secured and preferred ,been used for years. As we do not want to put source code in the production server.

Website model by default source code files sit in production and what ever you change that gets automatically gets compiled and updated when you save. In Website model we need to move Code Files and also ASPX Files into the production.