18.11.09

Webssite Vs. Web Application

* Fundamentally the behavior of the application types is same but website project type is folder based and WebApp is project type like normal project types in VS studio.In WebApplication project type project file defines the structure of the project.

* WebSite project type contains the folders and anything that you put in the folder are dynamically compiled and be part in the website. More about ASP.NET Website Dynamic compilation here.

* WebApplication project type contains the designer for the ASPX page and you can find the bin folder which contains the compiled assembly.

ASP.NET website project type is dynamic and WebApp is more like structured.

* When you add a class file to the website project it will prompt you that it will place the file in App_code folder under root.
Notice In website project type namespace won't add to the class by default however you can define the namespaces explicitly where as in WebApp it creates the namespace for the class file when you added it to the project.

* WebApp project type is restricted to one language where as Website you can add different language files to the App_Code folder which compiles the files dynamically.

* Referring a user control in WebApp is straight forward.You can define the properties and can be accessed in class files like any other objects where as in website it is not.

* We can put multiple language files in the Website but those files needs to be in same folder. If you change the location of the file then you need to mention in the Web.Config file as follows..
OpnAngl codeSubDirectories ClosAngl
OpnAngl add directory Name="Testfolder"/ClosAngl
OpnAngl /codeSubDirectories ClosAngl
In compilation process you will have the finer degree of control in WebApp and it is not in Website because everything is dynamically compiled.

* When you deploy the WebApps you can just copy the Compiled Assembly and Visual elements to the IIS folder where as in Website you need to copy everything to the IIS to work.

* If you use WebApplication project you can not access Profie at design time
Web site
No solution or project files are required and the pages and source can reside locally (file system, IIS) or remotely (FTP, WebDev/FrontPage extensions) via the File > Open > Web Site… menu option.

Code-behind and classes are typically stored on the web server which compiles them in-memory on demand. Changes can be made to the files without restarting the application and losing sessions.

Web Appli
Like the name implies these are primarily for web applications, those times when you have written a product or solution that happens to have a web interface.

Web application projects exist on your local drive and are treated like any other VS project type and can be added to existing solutions are subject to full compilation, validation and build steps.

Deployment is typically via MSI installers however you can also utilise the addition Web Deployment Projects add-in which allows you to deployment directly to servers which is useful for deploying to test environments.