WCF Jumpstart

This course is designed to get you from no knowledge of Windows Communication Foundation (WCF), to up and running with the basics of WCF in a very short time. You'll learn how to implement services, service hosts, and clients to connect to the services in .NET.
Course info
Rating
(1723)
Level
Beginner
Updated
Jul 17, 2014
Duration
1h 49m
Table of contents
Description
Course info
Rating
(1723)
Level
Beginner
Updated
Jul 17, 2014
Duration
1h 49m
Description

In this course, you will get up and running quickly with Windows Communication Foundation (WCF) in a couple of hours. You'll learn the fundamental concepts behind WCF, including what it's for, and what the building blocks are that you will use in implementing services and clients. You'll see how to define service contracts, data contracts, and services. Then you will see how to get the service hosted and configure its endpoints, behaviors, and bindings. Next, you'll see how to quickly implement clients and code to generate the proxy needed to connect to the service. Finally, you will get a quick introduction to security so that you can deploy your services with security protecting them.

About the author
About the author

Brian Noyes is CTO and Architect at Solliance, an expert technology solutions development company. Brian is a Microsoft Regional Director and MVP, and specializes in rich client technologies including XAML and HTML 5, as well as building the services that back them with WCF and ASP.NET Web API.

More from the author
WPF Productivity Playbook
Intermediate
2h 57m
Aug 22, 2016
More courses by Brian Noyes
Section Introduction Transcripts
Section Introduction Transcripts

Hello WCF!
Hi, this is Brian Noyes and welcome to this course, WCF Jumpstart. This course is designed to take you from ground zero to up and running with WCF in a very short amount of time. This course makes no assumptions about any background in WCF, although hopefully you have the general idea of what WCF, or Windows Communication Foundation, is for. It's for connecting clients and services across distributed boundaries, local area networks, or across the internet. So in this course you'll learn how to define services, the hosting environment for those services, and clients to connect to those services to get you started using WCF quickly. Let's talk about what we're going to cover in this course. This first module that we're in right now is the Hello WCF module, and we'll cover the fundamental concepts behind WCF, and walk you through some quick demos to get you familiar with the experience of working with WCF. Then starting with the second module, I'm going to start walking you through the process of defining services, defining the host for those services, implementing clients to connect to those services, and finally, a quick intro to security because you shouldn't build real world services and deploy them without having some security around them. So through these modules I'll walk you through the process of connecting end to end with WCF to get you up and running. Now let's talk about what we're going to cover in this first module.

Implementing Services
In this module we're going to start diving into implementing our pizza ordering system, starting with the service definition, which includes defining service contracts, data contracts, and the service implementation class. First up we'll summarize the overall process of defining a service implementation. And then we'll get right down to code and start off by defining service contracts, let you see what it looks like at code, and discuss the considerations there. Part of defining a service contract, as discussed in module one, is defining data contracts, the parameters that flow into methods, and the return types that come back from them. So we'll look at what it means to define a data contract, and what some of the options are there. Finally, we'll get to the service implementation class where the gory details of your logic sit that's being invoked over the service boundary, and we'll see what some of the options are there. And that will complete this module before we move on to hosting the service in the next module. So let's dive right in.

Hosting Services
Hi this is Brian Noyes, in this module we're going to cover hosting your services, giving them a Runtime environment to exist in to answer calls. First up, we'll talk about hosting in general, and what your options are there, then we'll dig right in in demo mode. And first off we'll talk through the service configuration that you'll need, which unfortunately is the most complex area of WCF, and it's one of the things that sometimes gives WCF a bad reputation because you do need a fair amount of configuration to set up your services. Once we've talked through the configuration, we'll look at running your service in the WCF Service Library you defined it in. Then we'll move on to self hosting, which is running it in any. NET process, and we'll see how to do it in a console app in the demos, but for production and deployment purposes, this would often be in a Windows service deployed to a server. And then finally, we'll look at IIS hosting, if you're just going to be exposing web protocols, then IIS makes a great host for this, and give you a lot of configurability options. So we'll see how you create a web project that can be deployed to IIS as your host. So let's dive right in.

Implementing Clients
Hi, this is Brian Noyes. This module is going to focus on implementing the client-side of the WCF equation. So we're going to look at how you get connected to the service that we've implemented so far, focusing primarily on code generating the client-side proxy code needed, but also talking a little bit about manually coding it. First up we'll talk about what you need on the client-side in a general sense, and we'll talk through how you code generate things, what the code generation does for you, and other considerations on the client-side. Then we'll get into demo mode and we'll start off by talking through code generating the proxy code you need on the client-side with the add service reference feature of Visual Studio. Then we'll look at actually making calls from the client through that proxy, and talk about what that code needs to look like, and some of the considerations. Finally, we'll finish up by talking about manually implementing your client proxies instead of code generating them so that you can see what that looks like, and we'll talk about when you might do that. So let's dive right in on the client-side.

Quick Intro to WCF Security
Hi, this is Brian Noyes. In this last module I want to give you a Quick Intro to WCF Security. So far in the course we've seen how to define services, get them hosted, and consume them from clients. But no one should approach building WCF services and deploying them without securing them. Now security's a big topic in WCF, so I'm only going to scratch the surface in this module and give you a sense of what the capabilities are and demonstrate one of the most common usage, especially in enterprise scenarios, which is to use the built-in Windows security. First off we'll give a high level overview of what the security capabilities of WCF are. Then we'll go into some specifics on Windows authentication, which is the default, and again is a very common form of security to use because it's the default and because it covers a broad range of scenarios for enterprise applications. We'll look at what's on by default and how you can leverage that, and we'll also look at the end about how to use alternate credentials from the client-side. So let's dive into a quick tour of security.