Consuming a WCF Service
You consume a WCF service from a .NET client by adding a service reference to your project. Visual Studio then generates a proxy class for calling your service. You use this proxy class to call your service from your .NET client application. Your client application could be a website, any variety of Windows application, or an application on another platform. Let’s look at an example of calling WCF from an ASP.NET MVC site.
Note
ASP.NET 5 does not currently have the concept of a Service Reference (at least at the time of writing). Therefore, the example that follows uses an MVC application that targets ASP.NET MVC 6 (and not ASP.NET 5). This allows you to see the Service Reference concept in action.
You can also consume ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access