O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required