Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

How to: Host and Run a Basic Windows

Communication Foundation Service


.NET Framework 4
Other Versions

 .NET Framework 3.5


 .NET Framework 3.0

This is the third of six tasks required to create a basic Windows Communication Foundation
(WCF) service and a client that can call the service. For an overview of all six of the tasks,
see the Getting Started Tutorial topic.

This topic describes how to run a basic Windows Communication Foundation (WCF) service.
This procedure consists of the following steps:

 Create a base address for the service.

 Create a service host for the service.

 Enable metadata exchange.

 Open the service host.

A complete listing of the code written in this task is provided in the example following the
procedure. Add the following code into the Main() method defined in the Program class.
This class was generated when you created the Service solution.

To configure a base address for the service


1. Create a Uri instance for the base address of the service. This URI specifies the HTTP
scheme, your local machine, port number 8000, and the path
ServiceModelSample/Service to the service that was specified for the namespace of
the service in the service contract.

VB
C#

C++

F#

JScript

Copy

Uri baseAddress = new


Uri("http://localhost:8000/ServiceModelSamples/Service");

To host the service


1. Import the System.ServiceModel.Description namespace. This line of code
should be placed at the top of the Program.cs/Program.vb file with the rest of the
using or imports statements.

VB

C#

C++

F#

JScript

Copy
using System.ServiceModel.Description;

2. Create a new ServiceHost instance to host the service. You must specify the type that
implements the service contract and the base address. For this sample the base address
is http://localhost:8000/ServiceModelSamples/Service and
CalculatorService is the type that implements the service contract.

VB

C#

C++

F#

JScript

Copy

ServiceHost selfHost = new ServiceHost(typeof(CalculatorService),


baseAddress);

3. Add a try-catch statement that catches a CommunicationException and add the code
in the next three steps to the try block. The catch clause should display an error
message and then call selfHost.Abort().

VB

C#
C++

F#

JScript

Copy

try
{
// ...
}
catch (CommunicationException ce)
{
Console.WriteLine("An exception occurred: {0}", ce.Message);
selfHost.Abort();
}

4. Add an endpoint that exposes the service. To do this, you must specify the contract
that the endpoint is exposing, a binding, and the address for the endpoint. For this
sample, specify ICalculator as the contract, WSHttpBinding as the binding, and
CalculatorService as the address. Notice here the endpoint address is a relative
address. The full address for the endpoint is the combination of the base address and
the endpoint address. In this case the full address is
http://localhost:8000/ServiceModelSamples/Service/CalculatorService.

VB

C#

C++

F#

JScript
Copy

selfHost.AddServiceEndpoint(
typeof(ICalculator),
new WSHttpBinding(),
"CalculatorService");

Note:
Starting with .NET Framework 4, if no endpoints are explicitly configured for the
service then the runtime adds default endpoints when the ServiceHost is opened. This
example explicitly adds an endpoint to provide an example of how to do so. For more
information about default endpoints, bindings, and behaviors, see Simplified
Configuration and Simplified Configuration for WCF Services.

5. Enable Metadata Exchange. To do this, add a service metadata behavior. First create a
ServiceMetadataBehavior instance, set the HttpGetEnabled property to true, and then
add the new behavior to the service. For more information about security issues when
publishing metadata, see Security Considerations with Metadata.

VB

C#

C++

F#

JScript

Copy

ServiceMetadataBehavior smb = new ServiceMetadataBehavior();


smb.HttpGetEnabled = true;
selfHost.Description.Behaviors.Add(smb);

6. Open the ServiceHost and wait for incoming messages. When the user presses the
ENTER key, close the ServiceHost.

VB

C#

C++

F#

JScript

Copy

selfHost.Open();
Console.WriteLine("The service is ready.");
Console.WriteLine("Press <ENTER> to terminate service.");
Console.WriteLine();
Console.ReadLine();

// Close the ServiceHostBase to shutdown the service.


selfHost.Close();

To verify the service is working


1. Run the service.exe from inside Visual Studio. When running on Windows Vista, the
service must be run with administrator privileges. Because Visual Studio was run with
Administrator privileges, service.exe is also run with Administrator privileges. You
can also start a new command prompt running it with Administrator privileges and
run service.exe within it.
2. Open Internet Explorer and browse to the service's debug page at
http://localhost:8000/ServiceModelSamples/Service.
Example
The following example includes the service contract and implementation from previous steps
in the tutorial and hosts the service in a console application. Compile the following into an
executable named Service.exe.

Be sure to reference System.ServiceModel.dll when compiling the code.

VB
C#
C++
F#
JScript

Copy
using System;
using System.ServiceModel;
using System.ServiceModel.Description;

namespace Microsoft.ServiceModel.Samples
{
// Define a service contract.
[ServiceContract(Namespace = "http://Microsoft.ServiceModel.Samples")]
public interface ICalculator
{
[OperationContract]
double Add(double n1, double n2);
[OperationContract]
double Subtract(double n1, double n2);
[OperationContract]
double Multiply(double n1, double n2);
[OperationContract]
double Divide(double n1, double n2);
}

// Service class that implements the service contract.


// Added code to write output to the console window.
public class CalculatorService : ICalculator
{
public double Add(double n1, double n2)
{
double result = n1 + n2;
Console.WriteLine("Received Add({0},{1})", n1, n2);
Console.WriteLine("Return: {0}", result);
return result;
}
public double Subtract(double n1, double n2)
{
double result = n1 - n2;
Console.WriteLine("Received Subtract({0},{1})", n1, n2);
Console.WriteLine("Return: {0}", result);
return result;
}

public double Multiply(double n1, double n2)


{
double result = n1 * n2;
Console.WriteLine("Received Multiply({0},{1})", n1, n2);
Console.WriteLine("Return: {0}", result);
return result;
}

public double Divide(double n1, double n2)


{
double result = n1 / n2;
Console.WriteLine("Received Divide({0},{1})", n1, n2);
Console.WriteLine("Return: {0}", result);
return result;
}
}
class Program
{
static void Main(string[] args)
{

// Step 1 of the address configuration procedure: Create a URI


to serve as the base address.
Uri baseAddress = new
Uri("http://localhost:8000/ServiceModelSamples/Service");

// Step 2 of the hosting procedure: Create ServiceHost


ServiceHost selfHost = new
ServiceHost(typeof(CalculatorService), baseAddress);

try
{

// Step 3 of the hosting procedure: Add a service endpoint.


selfHost.AddServiceEndpoint(
typeof(ICalculator),
new WSHttpBinding(),
"CalculatorService");

// Step 4 of the hosting procedure: Enable metadata


exchange.
ServiceMetadataBehavior smb = new
ServiceMetadataBehavior();
smb.HttpGetEnabled = true;
selfHost.Description.Behaviors.Add(smb);

// Step 5 of the hosting procedure: Start (and then stop)


the service.
selfHost.Open();
Console.WriteLine("The service is ready.");
Console.WriteLine("Press <ENTER> to terminate service.");
Console.WriteLine();
Console.ReadLine();

// Close the ServiceHostBase to shutdown the service.


selfHost.Close();
}
catch (CommunicationException ce)
{
Console.WriteLine("An exception occurred: {0}",
ce.Message);
selfHost.Abort();
}

}
}
}

Note:
Services such as this one require permission to register HTTP addresses on the machine for
listening. Administrator accounts have this permission, but non-administrator accounts must
be granted permission for HTTP namespaces. For more information about how to configure
namespace reservations, see Configuring HTTP and HTTPS. When running under Visual
Studio, the service.exe must be run with administrator privileges.

Now the service is running. Proceed to How to: Create a Windows Communication
Foundation Client. For troubleshooting information, see Troubleshooting the Getting Started
Tutorial.

See Also
Tasks

Getting Started Sample


Self-Host

Last Published: 2010-06-09


Community Content Add
FAQ
Testing with VS2010 Express
If you get problems like mine with the URL try running this in command (with Admin)$0 $0
$0$0 $0 $0 C:\Users\cen4>netsh http add urlacl url=http://+:8000/ServiceModelSamples
user=Edmonton\cen4$0 $0 Edmonton = DOMAIN$0 $0 cen4 = user$0
$0 ServiceModelSamples = web service ROOT$0 $0 8000 = port$0 $0 + = IP (localhost)$0
$0 Note: use netsh ? for help$0
History
 1/15/2011
 MistxWork

Confused by your confusion


The tutorial seems to be fine to me. Maybe Microsoft has fixed it, but I don't have any
compile or runtime problems.
History

 12/13/2010
 Lazetti

Getting confused
There's no consistency in these examples. As a beginner in VB and WCF I couldn't get the
end of it. Could someone please post the right code? Tnx.

How to: Create a Windows Communication


Foundation Client
.NET Framework 4
Other Versions

 .NET Framework 3.5


 .NET Framework 3.0

This is the fourth of six tasks required to create a basic Windows Communication Foundation
(WCF) service and a client that can call the service. For an overview of all six of the tasks,
see the Getting Started Tutorial topic.

This topic describes how to retrieve metadata from a WCF service and use it to create a WCF
proxy that can access the service. This task is completed by using the ServiceModel Metadata
Utility Tool (Svcutil.exe) provided by WCF. This tool obtains the metadata from the service
and generates a managed source code file for a proxy in the language you have chosen. In
addition to creating the client proxy, the tool also creates the configuration file for the client
that enables the client application to connect to the service at one of its endpoints.

Note:
You can add a service reference to your client project inside Visual Studio 2010 to create the
client proxy instead of using the ServiceModel Metadata Utility Tool (Svcutil.exe).
Caution:
When calling a WCF service from a class library project in Visual Studio 2010 you can use
the Add Service Reference feature to automatically generate a proxy and associated
configuration file. The configuration file will not be used by the class library project. You will
need to copy the configuration file to the directory that contains the executable that will call
the class library.

The client application uses the generated proxy to create a WCF client object. This procedure
is described in How to: Use a Windows Communication Foundation Client.

The code for the client generated by this task is provided in the example following the
procedure.

To create a Windows Communication Foundation client


1. Create a new project within the current solution for the client in Visual Studio 2010
by doing the following steps:
1. In Solution Explorer (on the upper right) within the same solution that
contains the service, right-click the current solution (not the project), and
select Add, and then New Project.

2. In the Add New Project dialog, select Visual Basic or Visual C#, and choose
the Console Application template, and name it Client. Use the default
Location.

3. Click OK.

2. Add a reference to the System.ServiceModel.dll for the project:


1. Right-click the References folder under the Client project in the Solution
Explorer and select Add Reference.

2. Select the .NET tab and select System.ServiceModel.dll (version 4.0.0.0)


from the list box and click OK.

Note:
When using a command-line compiler (for example, Csc.exe or Vbc.exe), you must
also provide the path to the assemblies. By default, on a computer running Windows
Vista for example, the path is: Windows\Microsoft.NET\Framework\v4.0.

3. Add a using statement (Imports in Visual Basic) for the System.ServiceModel


namespace in the generated Program.cs or Program.vb file.

VB
C#

C++

F#

JScript

Copy

using System.ServiceModel;

4. In Visual Studio, press F5 to start the service created in the previous topic. For more
information, see How to: Host and Run a Basic Windows Communication Foundation
Service.
5. Run the ServiceModel Metadata Utility Tool (Svcutil.exe) with the appropriate
switches to create the client code and a configuration file by doing the following
steps:
1. On the Start menu click All Programs, and then click Visual Studio 2010.
Click Visual Studio Tools and then click Visual Studio 2010 Command
Prompt.

2. Navigate to the directory where you want to place the client code. If you
created the client project using the default, the directory is C:\Users\<user
name>\My Documents\Visual Studio 10\Projects\Service\Client.

3. Use the command-line tool ServiceModel Metadata Utility Tool (Svcutil.exe)


with the appropriate switches to create the client code. The following example
generates a code file and a configuration file for the service.

VB

C#

C++

F#
JScript

Copy

svcutil.exe /language:cs /out:generatedProxy.cs


/config:app.config
http://localhost:8000/ServiceModelSamples/service

By default, the client proxy code is generated in a file named after the service
(in this case, for example, CalculatorService.cs or CalculatorService.vb where
the extension is appropriate to the programming language: .vb for Visual Basic
or .cs for C#). The /out switch changes the name of the client proxy file to
GeneratedProxy.cs. The /config switch changes the name of the client
configuration file from the default Output.config to App.config. Note that both
of these files get generated in the C:\Users\<user name>\My
Documents\Visual Studio 10\Projects\Service\Client directory.

6. Add the generated proxy to the client project in Visual Studio, right-click the client
project in Solution Explorer and select Add and then Existing Item. Select the
generatedProxy file generated in the preceding step.

Example
This example shows the client code generated by the ServiceModel Metadata Utility Tool
(Svcutil.exe).

VB
C#
C++
F#
JScript

Copy
//-------------------------------------------------------------------------
-----
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1366
//
// Changes to this file may cause incorrect behavior and will be lost
if
// the code is regenerated.
// </auto-generated>
//-------------------------------------------------------------------------
-----

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel",
"3.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace="http://Microsoft.S
erviceModel.Samples", ConfigurationName="ICalculator")]
public interface ICalculator
{

[System.ServiceModel.OperationContractAttribute(Action="http://Microsoft.Se
rviceModel.Samples/ICalculator/Add",
ReplyAction="http://Microsoft.ServiceModel.Samples/ICalculator/AddResponse"
)]
double Add(double n1, double n2);

[System.ServiceModel.OperationContractAttribute(Action="http://Microsoft.Se
rviceModel.Samples/ICalculator/Subtract",
ReplyAction="http://Microsoft.ServiceModel.Samples/ICalculator/SubtractResp
onse")]
double Subtract(double n1, double n2);

[System.ServiceModel.OperationContractAttribute(Action="http://Microsoft.Se
rviceModel.Samples/ICalculator/Multiply",
ReplyAction="http://Microsoft.ServiceModel.Samples/ICalculator/MultiplyResp
onse")]
double Multiply(double n1, double n2);

[System.ServiceModel.OperationContractAttribute(Action="http://Microsoft.Se
rviceModel.Samples/ICalculator/Divide",
ReplyAction="http://Microsoft.ServiceModel.Samples/ICalculator/DivideRespon
se")]
double Divide(double n1, double n2);
}

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel",
"3.0.0.0")]
public interface ICalculatorChannel : ICalculator,
System.ServiceModel.IClientChannel
{
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel",
"3.0.0.0")]
public partial class CalculatorClient :
System.ServiceModel.ClientBase<ICalculator>, ICalculator
{

public CalculatorClient()
{
}

public CalculatorClient(string endpointConfigurationName) :


base(endpointConfigurationName)
{
}

public CalculatorClient(string endpointConfigurationName, string


remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}

public CalculatorClient(string endpointConfigurationName,


System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}

public CalculatorClient(System.ServiceModel.Channels.Binding binding,


System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}

public double Add(double n1, double n2)


{
return base.Channel.Add(n1, n2);
}

public double Subtract(double n1, double n2)


{
return base.Channel.Subtract(n1, n2);
}

public double Multiply(double n1, double n2)


{
return base.Channel.Multiply(n1, n2);
}

public double Divide(double n1, double n2)


{
return base.Channel.Divide(n1, n2);
}
}
Now you have created a Windows Communication Foundation (WCF) client. Proceed to
How to: Configure a Basic Windows Communication Foundation Client to configure the
client. For troubleshooting information, see Troubleshooting the Getting Started Tutorial.

How to: Configure a Basic Windows


Communication Foundation Client
.NET Framework 4
Other Versions

 .NET Framework 3.5


 .NET Framework 3.0

This is the fifth of six tasks required to create a basic Windows Communication Foundation
(WCF) service and a client that can call the service. For an overview of all six of the tasks,
see the Getting Started Tutorial topic.

This topic adds the client configuration file that was generated using the ServiceModel
Metadata Utility Tool (Svcutil.exe) to the client project and explains the contents of the client
configuration elements. Configuring the client consists of specifying the endpoint that the
client uses to access the service. An endpoint has an address, a binding and a contract, and
each of these must be specified in the process of configuring the client.

The content of the configuration files generated for the client is provided in the example after
the procedure.

To configure a Windows Communication Foundation


client
1. Add the App.config configuration file generated in the previous How to: Create a
Windows Communication Foundation Client procedure to the client project in Visual
Studio. Right-click the client project in Solution Explorer, select Add and then
Existing Item. Next select the App.config configuration file from the directory from
which you ran SvcUtil.exe in the previous step. (This is named the App.config file
because you used the /config:app.config switch when generating this with Svcutil.exe
tool.) Click OK. By default, the Add Existing Item dialog box filters out all files
with a .config extension. To see these files select All Files (*.*) from the drop-down
list box in the lower right corner of the Add Existing Item dialog box.
2. Open the generated configuration file. Svcutil.exe generates values for every setting
on the binding. The following example is a view of the generated configuration file.
Under the <system.serviceModel> section, find the <endpoint> element. The
following configuration file is a simplified version of the file generated.
Copy

<?xml version="1.0" encoding="utf-8"?>


<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ICalculator">
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint

address="http://localhost:8000/ServiceModelSamples/Service/Calculator
Service"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_ICalculator"
contract="Microsoft.ServiceModel.Samples.ICalculator"
name="WSHttpBinding_ICalculator">
</endpoint>
</client>
</system.serviceModel>
</configuration>

This example configures the endpoint that the client uses to access the service that is
located at the following address: http://localhost:8000/ServiceModelSamples/service

The endpoint element specifies that the


Microsoft.ServiceModel.Samples.ICalculator contract is used for the
communication, which is configured with the system-provided WsHttpBinding. This
binding specifies HTTP as the transport, interoperable security, and other
configuration details.

3. For more information about how to use the generated client with this configuration,
see How to: Use a Windows Communication Foundation Client.

Example
The example shows the content of the configuration files generated for the client.

Copy
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ICalculator"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00"
bypassProxyOnLocal="false"
transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text"
textEncoding="utf-8"
useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32"
maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<reliableSession ordered="true"
inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint
address="http://localhost:8000/ServiceModelSamples/Service/CalculatorServic
e"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_ICalculator"
contract="ICalculator"
name="WSHttpBinding_ICalculator">
<identity>
<userPrincipalName value="user@contoso.com" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>

Now the client has been configured. Proceed to How to: Use a Windows Communication
Foundation Client. For troubleshooting information, see Troubleshooting the Getting Started
Tutorial.

How to: Use a Windows Communication


Foundation Client
.NET Framework 4
Other Versions
 .NET Framework 3.5
 .NET Framework 3.0

This is the last of six tasks required to create a basic Windows Communication Foundation
(WCF) service and a client that can call the service. For an overview of all six of the tasks,
see the Getting Started Tutorial topic.

Once a Windows Communication Foundation (WCF) proxy has been created and configured,
a client instance can be created and the client application can be compiled and used to
communicate with the WCF service. This topic describes procedures for creating and using a
WCF client. This procedure does three things:

1. Creates a WCF client.

2. Calls the service operations from the generated proxy.

3. Closes the client once the operation call is completed.

The code discussed in the procedure is also provided in the example following the procedure.
The code in this task should be placed in the Main() method of the generated Program class
in the client project.

To use a Windows Communication Foundation client


1. Create an EndpointAddress instance for the base address of the service you are going
to call and then create an WCF Client object.

VB

C#

C++

F#

JScript
Copy

//Step 1: Create an endpoint address and an instance of the WCF


Client.
CalculatorClient client = new CalculatorClient();

2. Call the client operations from within the Client.

VB

C#

C++

F#

JScript

Copy

// Step 2: Call the service operations.


// Call the Add service operation.
double value1 = 100.00D;
double value2 = 15.99D;
double result = client.Add(value1, value2);
Console.WriteLine("Add({0},{1}) = {2}", value1, value2, result);

// Call the Subtract service operation.


value1 = 145.00D;
value2 = 76.54D;
result = client.Subtract(value1, value2);
Console.WriteLine("Subtract({0},{1}) = {2}", value1, value2, result);

// Call the Multiply service operation.


value1 = 9.00D;
value2 = 81.25D;
result = client.Multiply(value1, value2);
Console.WriteLine("Multiply({0},{1}) = {2}", value1, value2, result);

// Call the Divide service operation.


value1 = 22.00D;
value2 = 7.00D;
result = client.Divide(value1, value2);
Console.WriteLine("Divide({0},{1}) = {2}", value1, value2, result);

3. Call Close on the WCF client and wait until the user presses ENTER to terminate the
application.

VB

C#

C++

F#

JScript

Copy

//Step 3: Closing the client gracefully closes the connection and


cleans up resources.
client.Close();

Console.WriteLine();
Console.WriteLine("Press <ENTER> to terminate client.");
Console.ReadLine();

Example
The following example shows you how to create a WCF client, how to call the operations of
the client, and how to close the client once the operation call is completed.

Compile the generated WCF client and the following code example into an executable named
Client.exe. Be sure to reference System.ServiceModel when compiling the code.
VB
C#
C++
F#
JScript

Copy
using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;

namespace ServiceModelSamples
{

class Client
{
static void Main()
{
//Step 1: Create an endpoint address and an instance of the WCF
Client.
CalculatorClient client = new CalculatorClient();

// Step 2: Call the service operations.


// Call the Add service operation.
double value1 = 100.00D;
double value2 = 15.99D;
double result = client.Add(value1, value2);
Console.WriteLine("Add({0},{1}) = {2}", value1, value2,
result);

// Call the Subtract service operation.


value1 = 145.00D;
value2 = 76.54D;
result = client.Subtract(value1, value2);
Console.WriteLine("Subtract({0},{1}) = {2}", value1, value2,
result);

// Call the Multiply service operation.


value1 = 9.00D;
value2 = 81.25D;
result = client.Multiply(value1, value2);
Console.WriteLine("Multiply({0},{1}) = {2}", value1, value2,
result);

// Call the Divide service operation.


value1 = 22.00D;
value2 = 7.00D;
result = client.Divide(value1, value2);
Console.WriteLine("Divide({0},{1}) = {2}", value1, value2,
result);

//Step 3: Closing the client gracefully closes the connection


and cleans up resources.
client.Close();

Console.WriteLine();
Console.WriteLine("Press <ENTER> to terminate client.");
Console.ReadLine();

}
}
}

Ensure the service is running before attempting to use the client. For more information, see
How to: Host and Run a Basic Windows Communication Foundation Service.

To launch the client, right-click Client in the Solution Explorer and choose Debug, Start
new instance.

Copy
Add(100,15.99) = 115.99
Subtract(145,76.54) = 68.46
Multiply(9,81.25) = 731.25
Divide(22,7) = 3.14285714285714
Press <ENTER> to terminate client.

If you see this output, you have successfully completed the tutorial. This sample
demonstrates how to configure the WCF client in code. For troubleshooting information, see
Troubleshooting the Getting Started Tutorial.

You might also like