WcfSvcHost and WcfTestClient in VS 2008
There are two nice helper apps included in Visual Studio 2008, which allow you to test-host your WCF service and invoke the methods to check they're working correctly.
The two apps are called WcfSvcHost.exe and WcfTestClient.exe.
By default they are set as default debugging activity in all WCF libraries. See how to get use of them:
- Create a new WCF Service Library
- Build an interface "ISayMyNameService" with a class parameter named "Name"
- Implement a new service class
- Change the class name of the hosted service in app.config:
- Press F5 and start debugging.
- Voila - the WcfSvcHost is started an displays a successfull message. Click on the message for details:
- At the same time the WcfTestClient got started and is now displaying a n UI for testing our simple WCF service. Double click on "HelloYou()" to invoke the method with parameters:
- Press "Invoke" and wait for the service to complete. You'll then get back the response as a formatted list or in raw XML.
- If you don't want the WcfTestClient, but your custom test client you can change the setting under the project properties: