posted on Thursday, June 23, 2005 9:50 AM
by
leon
ASP.NET 2.0 Deployment Without Source Code
I was asked couple of times recently about deployment of ASP.NET 2.0 application without source code.
New compilation model of ASP.NET allow immediate application update, including changes in codebehind files (ASP like “JUST SAVE” behavior). You are no longer required to compile Web Application before accessing it. It is very convenient behavior for development and even testing environment, but what about production? We, usually, do not want to upload source code to production server to be JIT compiled. It is not so good for intellectual property protection and allows dangerous accidentally code altering.
In VS2005 we have a lot of options to deploy Web Site:
- xcopy deployment
- Copy Web Site Wizard - provide nice GUI for copying/synchronization of files to/from destination server
- Web Setup Project
- Publish Web Site Wizard
- aspnet_compiler SDK utility
You can not use first two options to copy application without sources because normally compiled assembly stored in ASP.NET Temporary directory and not under application root. Only last two options will allow you to deploy precompiled Web without source code.
Notes:
Web Setup Project
• In beta2 this option was moved from Website to Build menu.
• It is not present in Web Express edition.
• Uncheck “Allow this precompiled site to be updateable“ option to remove markup from aspx files
aspnet_compiler
• You can only compile Web Site or compile and deploy it in single step
• Can not deploy to remote computer. You will have to deploy locally and copy output to remote server.