How to: Run a WSE QuickStart Sample

You must build a QuickStart sample before running it. Visual Studio 2005 solution files are included for building with Visual Studio 2005.

Note

Some QuickStart samples require additional configuration before running them. For more information, see the readme file in the Samples folder.

WSE provides Visual Basic and C# versions of each sample.

The following table specifies the location of the QuickStart samples.

Language Location

Visual Basic

<WSE3 Installation Directory>\v3.0\Samples\VB\Quickstart\<SampleName>

Default: C:\Program Files\Microsoft WSE\v3.0\Samples\VB\QuickStart

C#

<WSE3 Installation Directory>\v3.0\Samples\CS\Quickstart<SampleName>

Default: C:\Program Files\Microsoft WSE\v3.0\Samples\CS\QuickStart

To run a QuickStart sample

  1. Create a virtual directory for the Web service associated with the sample.

    For the QuickStart samples that use a Web service that is hosted in IIS, you must create a new virtual directory. To determine if a virtual directory is needed, navigate to the sample directory and check whether a file named CreateSampleVdir.bat is present; if not, a virtual directory is not needed.

    1. Navigate to the sample directory.
    2. Double-click CreateSampleVdir.bat.
      This invokes a batch file that creates the virtual directory for the sample.
      If you want to manually create the virtual directory, you must add the virtual directory to the root of your Web site or change the sample code to point to the alternative location. The name of the virtual directory is the name of the directory containing the code for the Web service.

    Note

    To remove the virtual directory at a later time, double-click DeleteSampleVDir.bat in the sample directory.

  2. Open the Visual Studio 2005 solution file and build the Web service and client.

    1. On the Start menu, click My Computer.
    2. Navigate to <WSE installation folder>\v3.0\Samples\<Language>\QuickStart\<SampleName>\<SampleType>
      where <Language> is either CS or VB for the C# or Visual Basic version of the sample, respectively; <SampleName> is the name of the sample; and <SampleType> is either Code or Policy for the version that uses just the WSE classes or the one that uses policy.
    3. Double-click the Visual Studio 2005 solution file (.sln).
    4. In Visual Studio 2005, on the Build menu, click Build Solution.
  3. Run the client application for the QuickStart sample.

    You can run the sample from within Visual Studio 2005 or from a command prompt, once the client and Web service executables have been created.

See Also

Concepts

Overview of WSE
WSE QuickStarts

Other Resources

QuickStart Samples