Creating the HelloWorldService service contract interface
In the previous section, we created the solution and the project for the HelloWorld
WCF service. From this section on, we will start building the HelloWorld
WCF service. First, we need to create the service contract interface.
In Solution Explorer, right-click on the HelloWorldService project, and select Add | New Item… from the context menu. The following Add New Item - HelloWorldService dialog window should appear on your screen.
On the left-hand side of the window (Installed Templates), select Visual C# Items as the template, and from the middle section of the window, select Interface.
At the bottom of the window, change Name from Interface1.cs to IHelloWorldService.cs.
Click on the Add button.
Now an empty service interface file has been added to the project. Follow the steps below to customize it.
Add a
using
statement:using System.ServiceModel;
Add a
ServiceContract
attribute to the interface. This will designate the interface as...