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 chooseWSE Settings 3.0. The app config dialog box appears. IfWSE Settings 3.0doesnotappear, proceed as follows:
    1. Reinstall WSE 3.0 by using the Add or Remove Programs menu.
    2. In the installer, selectModifyand 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, checkEnable this project for Web Services Enhancements.
    The General tabof the app config dialog box.

  4. Click the Policy tab and checkEnable Policy. ClickAdd. The Add or Modify Policy Friendly Name dialog box appears.
    The Policy tab in the app config dialog box.

  5. In theAdd or Modify Policy Friendly Namefield, enterCyberSource. If you use a name other than CyberSource, you must modify the value of thePOLICY_NAMEvariable in the sample code.ClickOK. The WSE Security Settings Wizard appears.
    Add a policy friendlyname dialog box.

  6. In theDo you want to secure a service or a clientfield, chooseSecure a client application. In theChoose Client Authentication Methodfield, chooseUsername. ClickNext.
    The AuthenticationSettings screen.

  7. On the next page,Specify Username Token in codeis 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. ClickNext.
    Select the Specify Username Tokenin code option.

  8. UncheckEnabled WS-Security 1.1 Extensions. Unchecking this option automatically selectsNone (rely on transport protection). ClickNext.
    The Message Protection screen.

  9. To exit the wizard, clickFinish.
  10. To save your changes, clickOK.