Dynamic Discovery Service WS-discovery in WCF 4.0

Source: Internet
Author: User

In WCF 3/3. 5, when we want to call a service, we must first know the address of the service, and then use the contract agreed by both parties to interact with the remote service through the Service proxy. Currently, WCF 4.0 provides support for the Discovery Service. When we want to call another service, there is no need to know the specific address of the service, WCF 4.0 implements the WS-discovery standard of oasis, and the related classes are defined in system. servicemodel. discovery namespace. This is a separateProgramSo you need to add a reference to it. You only need to use the relevant classes in the system. servicemodel. Discovery namespace to implement two methods of dynamic Discovery Service:

Ad hoc mode: it is easy to understand, that is, when the service is started, the Hello message is broadcast to the network. After receiving the message, the caller responds to establish a communication mode.


Managed mode: simply put, it means that all services are registered in a place called the discovery proxy in advance, and then all callers send a search request to the Discovery proxy to find and call the relevant service mode.

To dynamically discover services in WCF 4.0, it is relatively simple to use ad hoc mode. For managed mode, you must inherit the abstract class system. servicemodel. Discovery. discoveryproxy to implement your own discovery proxy.

  • WS-discovery 1.1 Specification: Http://docs.oasis-open.org/ws-dd/discovery/1.1/ OS /wsdd-discovery-1.1-spec-os.html
  • Discovery concepts: Http://blogs.msdn.com/discovery/archive/2009/05/29/discovery-overview.aspx
  • WCF discovery: Http://msdn.microsoft.com/en-us/library/dd456782 (vs.100). aspx
  • WS-discovery for WCF: Http://www.codeproject.com/KB/WCF/ws-discovery.aspx
  • 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.