What's New in WCF 4?

Version: 1.1.0

Description

Windows Communication Foundation 4 includes a new feature that enables service discovery. Service discovery allows you to locate services on the same subnet using ad hoc discovery, or using a proxy to establish connections with servers regardless of where they are. In this lab you will create a simple chat application that will use both methods to learn about available services.

Overview

Windows Communication Foundation (WCF) in .NET 4 includes three new features areas:

  • Simplified Configuration
  • Service Discovery
  • Service Routing

In this lab, you will get a chance to try out these new features and learn how they work. You will also experience the improved hosting and deployment capabilities of the new Windows Server AppFabric.

Note:
Do I have to do all the exercises?

This lab is long. To do all of it will probably take close to 2 hours. The lab is designed so that each exercise is independent of the others. Just open the solution found under the Begin folder for the exercise. For example, if you wanted to learn how to use Service Discovery you would start with Exercise 4 and open the solution from the Source\Ex4-ServiceDiscover\Begin folder

Objectives

In this Hands-On Lab, you will learn:

  • How simplifications to configuration make WCF easier to use
  • How to use Service Discovery to locate services
  • How to use Service Routing
  • How to Deploy and Monitor services using AppFabric

System Requirements

You must have the following items to complete this lab:

  • Microsoft Visual Studio 2010
  • Microsoft .NET Framework 4
  • Windows Server AppFabric - Download

Setup

All the requisites for this lab are verified using the Dependency Checker. To make sure that everything is correctly configured, follow these steps:

  1. Run the Configuration Wizard for the Training Kit if you have not done it previously. To do this, browse to Source\Setup folder of this lab, and double-click the Dependencies.dep file. Install any pre-requisites that are missing (rescanning if necessary) and complete the wizard.
    Note:
    The Configuration Wizard is used for checking dependencies and setting up the environment. If the Configuration Wizard is not installed on your machine, you must install it running the DependencyChecker.msi file located on the %VS2010TKInstallationFolder%\Assets\DependencyChecker folder (e.g. by default the Training Kit is installed under C:\VS2010TrainingKit).

    For convenience, much of the code you will be managing along this hands-on lab is available as Visual Studio code snippets that are automatically installed by the DependencyChecker

Exercises

This Hands-On Lab comprises the following exercises.

Simplified Configuration

  1. Simplified Configuration
  2. Service Behavior
  3. Protocol Mapping

Service Discovery

  1. Service Discovery
  2. Metadata Extensions
  3. Discovery Announcements
  4. Discovery Proxy

Routing

  1. Service Routing
  2. Content Based Routing
  3. Backup Lists

AppFabric

  1. Deploying the Web Application

Starting Materials

This Hands-On Lab includes the following starting materials.

  • Visual Studio solutions. Depending on the exercise you will find Visual Studio solutions for C# and Visual Basic that you can use as starting point for the exercises.
Note:
What if I get stuck?

The source code that accompanies this hands-on lab includes an end folder where you can find a Visual Studio solution with the code that you would obtain if you complete the steps in each exercise. You can use this solution as a guide if you need additional help working through the exercises.

Next Step

Setup