ASNA WingsRPG™ Reference Manual

Deploying the Application

How you deploy the ASNA Wings application can vary with the language and whether you use ClickOnce deployment or the Windows Installer deployment method. See Microsoft Developer Network topic Deploying Applications and Components for more information and considerations on the deployment method you use. See also, the ASNA Wings Deployment Guide.

Deploying Multiple Wings Web Sites to a Single Virtual Directory

Below is the default folder structure of a Wings Web site in Visual Studio. Let's consider this Web site the top-level Wings project. That is, its "published" results will be deployed in their entirety to a virtual directory on a Web server. Subsequent Wings Web sites will then contribute only their respective View\x folder to the deployment virtual directory.

|---App_Code
|---MessageFiles
|---Monarch
|   |---5250ColorSchemas
|---Themes
|   |---Current
|       |---Images
|---Views
    |---Project1

Having done Build->Publish Web Site produces this folder structure:

|---bin
|---Monarch
|   |---5250ColorSchemas
|---Themes
|   |---Current
|       |---Images
|---Views
    |---Project1

The contents shown above become the initial contents of the virtual directory on the Web server – replacing all that was there before.

Deploying additional Web site projects' View folders to the Published Web site

In many cases, several VS Web sites will contribute to the deployed content in the site's virtual directory. This is especially true in shops that have multiple teams contributing display files/ASPX pages. For these additional Web sites, deployment is as simple as copying their views folders to the overall site's virtual directory.

Let's assume that we have a second Wings Web site, named Project2 that another developer has done. In this case, it has a Project2 folder under the Views folder. This Views\Project2 folder needs to be deployed to the virtual directory's view folder. For the best use of this technique, each secondary Web site should store its views in a folder under the Views folder named [VS Web site name]. In this case there is a folder named Project2 under the views folder.

|---App_Code
|---MessageFiles
|---Monarch
|   |---5250ColorSchemas
|---Themes
|   |---Current
|       |---Images
|---Views
    |---Project2

For this project, you DO NOT need to do Build->Publish Web Site. Once you're sure this Web site has passed testing, you only need to copy its Views\Project2 folder to the deployment virtual directory's View folder. Note that you the .ASPXs, the .ASPX.WRFs, and the .ASPX.VRs to the virtual directory's View folder.

At runtime, the code-behind VR will be used _the first time_ (and only the first time) the its ASPX page is requested. At a later date, after you're sure all ASPXes have been compiled you can remove the ASPX.VRs if you want to.

After copying the Views\Project2 folder, the virtual directory's root on the Web server looks like this:

|---bin
|---Monarch
|   |---5250ColorSchemas
|---Themes
|   |---Current
|       |---Images
|---Views
    |---Project1
    |---Project2   < contents contributed from Project2 Web site

You can add the Views\x folder from as many additional VS Web sites as necessary to the virtual directory on the Web server.

Considerations for this Deployment Technique

  • Secondary Web sites must use exactly the same master page as the primary site.
  • Secondary Web sites cannot add to the Web.Config (at least without providing for the ability to redeploy the new version of the Web.Config)
  • Secondary Web sites must ensure that they don't contain session and/or application variable names that would conflict with already existing session/application variable names. We highly recommend a full integration test on a test platform before deploying new ASPX pages.
  • We highly recommend you automate this copy facility (with something such as batch files or PowerShell scripts) so that you can automate the redeployment of your Web site.
  • A source control facility is highly recommended to help you track changes and be able to roll those changes back if necessary.
  • We recommend copying full folders from individual products to the production Web site, but if extreme care is taken to ensure correct versioning, you could also copy single ASPX pages as well.
  • You can't copy anything to the Web site while it's running. If you do, any active sessions will be abandoned (and those users won't be happy!)

Suggestion – Consider creating a template for "starter" Web sites using your master page, etc for your developers to use.

See also the Wings Deploymenet Guide.