Skip to main content

Web Application Projects vs Web Site Projects in Visual Studio

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.
Area
Web application projects
Web site projects
Project file structure
A Visual Studio project file (.csproj or .vbproj) stores information about the project, such as the list of files that are included in the project, and any project-to-project references.
There is no project file (.csproj or .vbproj). All the files in a folder structure are automatically included in the site.
Compilation
  • You explicitly compile the source code on the computer that is used for development or source control.
  • By default, compilation of code files (excluding .aspx and .ascx files) produces a single assembly.
  • The source code is typically compiled dynamically (automatically) by ASP.NET on the server the first time a request is received after the site has been installed or updated.
    You can precompile the site (compile in advance on a development computer or on the server).
  • By default, compilation produces multiple assemblies.
Namespaces
Explicit namespaces are added to pages, controls, and classes by default.
Explicit namespaces are not added to pages, controls, and classes by default, but you can add them manually.
Deployment
  • You copy the assembly to a server. The assembly is produced by compiling the application.
  • Visual Studio provides tools that integrate with Web Deploy (the IIS web deployment tool) to automate many deployment tasks.
  • You copy the application source files to a computer that has IIS installed on it.
  • If you precompile the site on a development computer, you copy the assemblies produced by compilation to the IIS server.
  • Visual Studio provides tools that integrate with Web Deploy (the IIS web deployment tool) to automate many deployment tasks.

Comments

Popular posts from this blog

Jadwal Dokter Poliklinik Afiat RS PMI Bogor

Share informasi jadwal dokter di poli afiat RS PMI Bogor aja :)

Diary HEG #1

Dari berbagai sumber yang ku baca tentang HEG alias Hyper Emesis Gravidarum, kebanyakan yang menuliskan adalah ibu-ibu yang mengalami sendiri. Belom menemukan tulisan dari sisi suami atau keluarga terdekat. Aku pengen mencoba berbagi pengalaman HEG dari sudut pandang suami. Ketika postingan ini saya tuliskan, kondisi istri saya sedang hamil kira-kira 4 minggu. Karena belum ada niatan untuk datang ke dokter, maklum ini bukan anak pertama. Biasanya yang paling rajin kontrol adalah ketika anak pertama saja. Hahaha Sekarang adalah kehamilan ketiga sejak kami menikah 6 tahun lalu. Kehamilan pertama juga pada bulan-bulan ini, juli-agustus 2013. Karena belum ada pengalaman sama sekali, kami sangat rutin untuk kontrol ke obgyn setiap bulan, USG dan multivitamin. Dulu pengalamannya dengan dr. Gharini Paramitha di salah satu klinik yang saat ini sudah tutup. Ditambah dengan second opinion dokter lain di RS PMI, dr. Vivi Sylvia. Terus terang aku dan istri lebih cocok dengan dr. Vivi, tapi y...

Penutupan Kartu Kredit BNI

Berhubung dengan banyaknya kebutuhan dan sudah ada satu kartu kredit lagi, akhirnya memutuskan untuk menutup salah satu CC saya di BNI.  Wah, bagaimana caranya ya? Pasti repot ih, tutup CC. Karena sales aja banyak banget *gambar nyomot dari sini Langkah pertama yang rutin saya kerjakan adalah googling. Kemudian yang saya temukan adalah : Jangan Pakai atau Segera Tutup Kartu Kredit BNI Ternyata yang terjadi (dan seringkali terjadi) adalah : 1. Customer tidak mampu bayar, belanja diluar kemampuan 2. Customer malas membaca tagihan/statement, sehingga tidak mengetahui denda/bunga 3. Customer tidak terbiasa membayar longgar atau jauh sebelum jatuh tempo 4. Customer tidak mengetahui prosedur pembayaran dari bank lain Sedangkan yang terjadi pada saya (Alhamdulillah) 1. Telp call center BNI 1500046 2. Masukkan data plus verifikasi data 3. Jelaskan maksud dan tujuan 4. Disambungkan ke bagian penutupan kartu 5. Akan dikirimkan surat penutupan d...