C # Use SoapUI to debug the WCF Service Interface (verification that includes the user name and password in WCF ),

Source: Internet
Author: User
Tags soapui

C # Use SoapUI to debug the WCF Service Interface (verification that includes the user name and password in WCF ),

Problem description:

Generally, you can directly create a unit test to debug the wcf program and call the interface directly.

However, this time, I also want to test whether the user name and password received in the code in the interface are correct. Therefore, a single direct call to the interface method is not feasible,

Then you can try to call the interface debugging by entering the user name and password through soapUI.

 

Solution:

1. Set up IIS Site a to point ...... Src \ WCF (right-click the project name-> open a folder in the file resource manager, copy the path to the opened folder, create a site, and point to the path)

2. Set the IP address of Site a to 127.0.0.1. The port is free of conflict.

3. Find the service on the IIS Site, such as "StoreCreditWCF. svc" --> email --> browse. Make sure that the service can be opened in the browser. Copy the link to open it in SoapUI.

4. Find the target interface in soapUI, fill in the username and password type, and fill in the parameters

5. in the project, select the WCF Service Project, debug --> attach to the process, select "display all user processes" --> refresh, and find the path of iis中 A (that is, w3wp.exe) in the available line ", and the user name contains the process of site a name)-> select-> attach

6. Break the breakpoint in the WCF Service Interface and click soapUI to debug the interface.

Have you found that the program is running at the breakpoint you set?

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.