How to: Test the Discovery Proxy
This is the fourth of four topics that shows how to implement a discovery proxy. In the previous topic, How to: Implement a Client Application that Uses the Discovery Proxy to Find a Service, you implemented a WCF client application that uses the discovery proxy to find a service and then calls the service. This topic describes how to verify the discovery proxy, the service, and the client application work as expected.
Run the Discovery Proxy
Open a command prompt as an administrator.
You may see a dialog that says: Windows Firewall has blocked some features of this program. If you see this message, click the Unblock button.
Within the command prompt, run the discovery proxy, DiscoveryProxy.exe.
The application should display the following text:
Proxy started. Hit Enter to exit
.
Run the Discoverable Service
Open a command prompt as an administrator.
Within the command prompt, run the Service.exe discoverable service.
The DiscoveryProxy.exe should display the following text:
******* Adding the following service: ** [Service Contract Name] ** [Service Endpoint Addr] 3.******* Done *******
.
Run the Client Application
Open a command prompt.
Within the command prompt, run the client.exe application.
After a few seconds the client application displays the following text: Connecting to [Service-Endpoint].
The service.exe should then display the following text: Greeting request received, I will respond.
The client.exe should then display the following text: Hello Client!
Shut Down the Applications
Shut down the client application.
Shut down the service. The discovery proxy displays the following text:
******* Removing the following service: ** [Service Contract Name] ** [Service Endpoint Addr] 2.3.******* Done *******
.Shut down the discovery proxy.