Deploying a WSE-Enabled Application

The following options are available when deploying an application that uses the Web Services Enhancements for Microsoft .NET Framework (WSE):

Installation Option Description

Use the ClickOnce feature in Visual Studio 2005 to deploy the WSE assembly with your application.

To have ClickOnce install the WSE assembly (Microsoft.Web.Services3.dll) without using the WSE setup, specify the publish status for the WSE assembly to Include. Include is the default publish status for reference assemblies.

Use ClickOnce to deploy the WSE setup program (.msi file) with your application.

To have ClickOnce use the WSE setup program, make WSE a prerequisite for your application.

  1. With the project selected in Solution Explorer, on the Project menu, click Properties.
  2. Click the Publish tab.
  3. Click the Application Files button to open the Application Files dialog box.
  4. In the Application Files dialog box, select the application assembly (.dll file) that you want to mark as a Prerequisite. Note that your application must have a reference to the application assembly to appear in the list.
  5. In the Publish Status field, select Prerequisite from the drop-down list.

Use a custom setup program to deploy the WSE assembly with your application.

  • Custom setup programs can detect whether WSE 3.0 is installed by checking for the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WSE\{EDEA8AB7-7683-4ED2-AA19-E6C078064C0D}
  • Custom setup programs can use the WSE setup to install the WSE runtime without user interaction.
    The following command line launches the WSE run-time setup from the current directory without user interaction.

    start /wait msiexec /i "Microsoft WSE 3.0 Runtime.msi" /q

Note

When the WSE assembly is not installed using the WSE setup program, warnings and errors may not be written to the Application event log and the event source that WSE uses to write to the log is never removed. WSE writes entries to the application event log using an event source named Microsoft WSE 3.0. When WSE is installed and uninstalled using its setup program, this event source is created during installation and removed during uninstallation. Additionally, when WSE writes to the application event log it verifies that the event source exists and if it does not, it attempts to create it. If the event source does not exist and the application does not have sufficient permissions to create it, then errors and warnings are not written to the application event log. Therefore, when an application deploys the WSE assembly without the WSE setup program, an application should create the WSE event source during the installation and remove it during the uninstallation.

The following code example creates the WSE event source.

The following code example removes the WSE event source.

For more information about ClickOnce, see the .NET Framework SDK documentation.