C # Winform WCF debugging service-side programs

Source: Internet
Author: User

Method One:

server-side settings :

1. Open the solution you want to debug, right-click on the WCF Server project and set it as the startup project


2. Click on this solution


Or, press F5 directly to start the WCF service-side project.

3, look for the port number:

I, mode one

After you start debugging, the following interface appears in your browser


Note that the port number in the address bar is a must.

II, mode two:

After you start the WCF service project, it appears in the lower-right corner of the desktop, as shown in the following icon:


You can also see the port number here, because I restarted the WCF project once, so the port number displayed is not the same as in the browser.


Client Settings :

4. Open the solution again, set the client as the startup project, and call the server side in the UI project, so set the UI project as the startup item


5. Modify the port number of the WCF reference address in the UI's app. Config (based on the port number of the WCF service project that was started earlier)


6, start the UI, that is, the solution of the client, at this time, as long as the service side of the corresponding function to add a breakpoint can be tracked in.

Add:

To debug the server in this way, you need to reference the current local WCF service when the client references the WCF service, such as in this case, you can add:

1. Add a service reference where you want to add a WCF service reference:

Click in the pop-up screen and find that the VS will automatically find the service in the solution, such as

OK, get it done!

Copyright: jiankunking Source: http://blog.csdn.net/jiankunking This article is copyright to the author and Csdn, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original connection.

C # Winform WCF debugging service-side programs

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.