Week 5b - Windows Communication Foundation

WCF Concepts and Examples

Web Resourses:

Content:

This lecture continues discussion of Windows Communication Foundation (WCF), including a few examples.
  1. The Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Projects:

  3. Windows Communication Foundation Presentation:

  4. Tutuorials and Background:

  5. Code examples:

    We will look at serveral of these examples, focusing on:
    • Service Contract Definition
    • Service implementation
    • Client Proxies
    • Resulting operations

    Most of these examples are self-hosted services, e.g., run in a Windows process.

    You have to run Visual Studio 2014 as administrator to run these examples. If you don't run as administrator all the examples will abort with confusing error messages. To run "as administrator" use Windows search for Visual Studio. It will return Visual Studio app. Right-click and select run as administrator.

    Note that there is only one WCF project wizard, in Visual Studio 2015, that builds a service hosted in IIS. That doesn't do anything very interesting. Since your projects will use self-hosted services, I suggest you start with one of the examples below instead of using the wizard. By-the-way, you can take a project, like one of these, and export it as a template. That will then be available from the project selections.

    Hand Crafted WCF Services - BasicHttp, Hand Crafted WCF Services - WSHttp
    Builds services without using the WCF wizard. Both declarative and programmatic construction of channels are illustrated.

    Self-Hosted Strings Service
    Demonstrate service sending strings by value, reference, and receiving out string.

    Self Hosted File Service
    Illustrates how to send files in chunks using a WCF service.

    Timed File Streaming Service
    Illustrates how to use streaming (inherently chunks) for both text and binary files.

    WCF Message Passing Communication
    Show how to build a simple, effective message-passing system using WCF data contract.

    WCF Peer-To-Peer Communication
    This example uses both WCF and WPF to build a chat like facility.
  6. Lecture Take-aways:

    The most important things we discussed are: