Web Site Deployment

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:

Precompilation Deployment with Web Deployment Projects

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:

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:

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">



 Last Updated: 1/10/2008 | Send topic feedback