This sample creates a simple WCF calculator service and builds a .Net console application client. Here is a quick walkthrough of the steps taken to build this solution:
- Create new Web Cloud Service project called Calculator
- In the Calculator_WebRole website, add a new WCF Service called Service.svc. The service contains two endpoints defined in the Web.config file.
- an endpoint using BasicHttpBinding - can be used by both .Net and Silverlight clients
- a metadata endpoint that both .Net and Silverlight clients can use to generate references to the service
- Create a .Net client by adding a new Console Application project called ConsoleCalculator
- Add a Service Reference to the WCF Service in the ConsoleCalculator project and use it to call operations
Demo Service The client for this sample is a console applicaiton and cannot be shown live, but the screenshot below shows the result:
|