Pre-compile web application by VS 2008
If you create a WEBSITE by visual studio 2008 you get the option to publish it. This option also has a feature to pre-compile all aspx pages which is very useful. It makes the web site running faster (for the first time) and protect the source code.
If you create a WEB APPLICATION there is no such a option, you can only build the project and all the aspx files will be open to changed with no protection, also the web site will be slow on the first run. The answer to this problem is the Web Deployment add-on for Visual Studio. This add-on let you to add a new type of project to your web site solution which provide lots of customizations on the build process including pre-compile the web site.
Download Visual Studio® 2008 Web Deployment Projects – RTW from:
Scott Guthrie had a nice simple tutorial for this add-on on his blog:
And this is the screen shot of the property page for Web Deployment add-on project, where I can define I do not want the aspx pages to be update able, i.e., pre-compile them to binary code: