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?