The Web Store Web project is shipped as a Web Application Project (WAP) which requires Visual Studio 2005 SP1 or Visual Studio 2008. WAP projects compile all CodeBehind source code into a single assembly in the BIN directory and for the Web Store this single assembly is Westwind.WebStore.dll.
To deploy a WAP application requires only that you compile your project successfully. When done your deployment process consists primarily of copying:
- All DLL assemblies from the BIN directory
- All ASPX/ASCX/MASTER/ASHX pages in all related folders (but not their .cs files)
- All files in the the App_Themes folder
- All files in the Images folder
- Don't copy the Classes folder
This option completely compiles your application on your local machine and then deploys the application to the server as a distinct compiled application. This process requires that you use the ASP.NET Precompiler or more specifically our provided front end tool for it to precompile the application. This option also relies on the
Web Deployment Projects tool available from Microsoft to compile the entire Web site into a single assembly.
Steps:
Download and install Web Deployment Projects. Use the AspNetCompiler tool proviced in the Tools directory to precompile the Web application. This utility provides a graphical front end to the ASP.NET compiler that makes it very easy to precompile:

Point it at your Virtual Directory (/wwStore above), select a local path where the precompiled files will be copied to, select Fixed Names so the names of the generated precompiled files don't change (allows you to copy only the updated precompiled assembly later) and mark the output to a Single Assembly which triggers using Web Deployment Projects for compilation. Note if this option is not enabled make sure you install WDP first! (you can precompile without WDP but you will have to update all files every time if you do!).
When ASP.NET precompiles it creates a new folder in the output path with all precompiled files in it. In these folders are these important files:
- PrecompiledApp.Config
Root. Required. Contains configuration for the precompiled application. Must be updated everytime a new file is added to the application. - ASPX/ASCX/MASTER etc.
The files only contain markers - they are not real files. These files are not even required if you don't plan on using Windows Authentication for access them. - bin\*.dll Assemblies
All of the assemblies need to be deployed. Only the WestWindWebStore.dll assembly should be changing when you precompile. The other assemblies are merely copied from the BIN directory. Anytime ANY change is made to either source code or an ASPX file a full precompile is required and the WestWindWebStore.Dll (or whatever you choose to name it) assembly must be updated as it contains the entire site's code. - bin\*.compiled files
Each ASPX/ASCX/MASTER file in the project is represented by a .compiled file in the bin directory and this file is required. One big reason for using Web Deployment Projects is that it's the only way that you can get consistent filenames for these files. Once you've copied these files, you don't have to update them - they are only markers and never change. Only when you change or add a new ASPX/ASCX/MASTER page do you need to update these files.
Pros:
Completely pre-compiled - no source code or ASPX page markup on the Web server
Minimal number of assembly files on the server
Easily updatable by updating just the compiled assemblies in most cases
Cons:
Requires complete recompilation for any changes even for markup page changes
Need to track .compiled files - remember to add new .compiled files for each page
First Time Upload of your Project to the Server
How you upload the project to the server is entirely up to you. Typically you'll use your ISP's FTP access to copy the project files to the server.
If you're using Source Code Deployment just copy the files directly out of your development directory straight to the server. If you are using Precompilation first precompile the project and then copy the files from the precompilation target directory - do not copy the development directory files - ever! Once you precompile files on the server can only be updated from a precompiled application.
Web.Config
When you deploy to the server remember that you also need to send a web.config file to the server and often this web.config file is slightly different than the one you keep locally for your development setup. For example, you probably want to set debug="false" in the compilation section, use different connection string settings for the database, change the policy or themes potentially.
The typical strategy for deployment of Web.Config is:
- Precompile your application into the target directory
- Modify the web.config file of the precompiled target to suit
- Upload all files to the server
On successive updates take care to NOT update web.config on the server. Web.config holds server specific ASP.NET configuration settings as well as the application specific settings that you configure on the Configuration form. These settings likely will be different than local.
So remember NOT to update Web.config on any updates. If you need to make changes to Web.Config you should make them manually by downloading the file, changing it and then uploading it back up individually.
Things you will likely want to change in web.config
<compilation defaultLanguage="c#" debug="false">