Home > Constructing SOAP with .NET 2.0 and WSE 3.0 > Preparing Your Application


Preparing Your Application

To test the sample code provided, you must have a console application.

  1. Create a new application, or open your existing application in Visual Studio.
  2. Right-click the project node and choose WSE Settings 3.0. The app config dialog box appears. If WSE Settings 3.0 does not appear, proceed as follows:
    1. Reinstall WSE 3.0 by using the Add or Remove Programs menu.
    2. In the installer, select Modify and install the Visual Studio Tools option.
    3. Restart Visual Studio.
    4. Repeat Steps 1 and 2.
  3. In the dialog box under the General tab, check Enable this project for Web Services Enhancements.
    The General tab of the app configdialogbox.
  4. Click the Policy tab and check Enable Policy. Click Add. The Add or Modify Policy Friendly Name dialog box appears.
    The Policy tab in the app configdialogbox.
  5. In the Add or Modify Policy Friendly Name field, enter CyberSource. If you use a name other than CyberSource, you must modify the value of the POLICY_NAME variable in the sample code. Click OK. The WSE Security Settings Wizard appears.
    Add a policy friendly name dialogbox.
  6. In the Do you want to secure a service or a client field, choose Secure a client application. In the Choose Client Authentication Method field, choose Username. Click Next.
    The Authentication Settings screen.

  7. On the next page, Specify Username Token in code is checked by default. If you leave this default setting your password appears as plain text in the wse3policyCache.config policy. However, if you specify the username and password in the code, you can retrieve the password from a database or from any other source. Click Next.
    Select the Specify Username Token in code option.
  8. Uncheck Enabled WS-Security 1.1 Extensions. Unchecking this option automatically selects None (rely on transport protection). Click Next.
    The Message Protection screen.
  9. To exit the wizard, click Finish.
  10. To save your changes, click OK.