How to Redirect WCF SOAP Services using WCF Routing Service

09. June 2015 Tutorial, WCF 0
There are scenarios where you want to forward calls to a service to another service based on its contents, the action invoked, the address, or etc. For more info on WCF Routing Service you can refer to the following links: https://msdn.microsoft.com/en-us/library/ee517423(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/ee517422(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/ee517424(v=vs.110).aspx This example demonstrates how you can forward all calls coming to, let’s ...

Everything about Windows Communication Foundation

01. December 2013 Tutorial, WCF 0
WCF Tutorial The WCF tutorial is a walk-through which provides the reader with basics of WCF. The contents of this tutorial have gathered mostly from the book Professional C# 2012 and .NET 4.5 by Christian Nagel and the author’s personal notes. WCF Tutorial, Part 1: Introduction WCF Tutorial, Part 2: Create a Simple Service and ...

WCF Duplex Communication Tutorial

01. December 2013 WCF 0
The client starts the connection to the service. After the client connects to the service, the service can call back into the client. Duplex communication can be done with the WsHttpBinding and the NetTcpBinding as well as by using WebSocket protocol. Contract For duplex communication a callback contract must be specified that is implemented in ...

WCF Duplex Communication Security Configurations

01. December 2013 WCF 1
Consider the scenario where the WCF Service has been hosted on Server A where it provides call back contracts for clients to be registered with and get notifications. In order to make the communication works some security settings must be considered. Without defining these configurations the server will be blocking the creation of any channel ...

How to implement and configure two contracts on one WCF service

01. December 2013 WCF 4
In this article demonstrates how you can implement two WCF Service Contracts on one Service and how to configure the service to support it. This became useful in duplex communications where the service needs to expose two different bindings. Consider the following scenario: The Service exposes two endpoints: wsDualHttpBinding and basicHttpBinding. Clients will be create ...

How to Call a WCF Service from Windows PowerShell

01. December 2013 PowerShell, WCF 0
You can call your WCF operation from PowerShell. What you need is to use New-WebServiceProxy cmdlet. New-WebServiceProxy will create a proxy object in order to communicate with the service. Look at the example below: [crayon-59253b594c9ae605628886/] Line 1: declares a variable to hold the wsdl URI Line 2: creates a New-WebServiceProxy object based on that URI ...

WCF Tutorial, Part 7: Create WCF Client

01. December 2013 WCF 0
The client application can be of any type from a simple console application to a WPF application. We will use WPF application for demonstration. Add a new WPF Application to the solution and name it as RoomReservationClient Start the service and add the service reference to this project with the name RoomReservationService Doing so will ...

WCF Tutorial, Part 6: Create a Custom Service Host

01. December 2013 WCF 0
You can host WCF services on any hosts, include: Windows Form, WPF, Windows Services, Windows Activation Services (WAS), IIS, or a Console Application. Add a new Console Application to the solution and name it RoomReservationServiceHost Add reference to: RoomReservationService RoomReservationContract System.ServiceModel Copy the necessary configurations from the Service’s App.config into the project’s App.config. Note that ...

WCF Tutorial, Part 5: WCF Service Host and WCF Test Client

01. December 2013 WCF 0
The WCF Service Library project template creates an application configuration file named App.config which needed to be modified to reflect the Service class and interface names. Class names should include the namespace as well. The typical WCF configuration file has the following schema: Configuration system.serviceModel services service ( name = \"RoomReservationService.RoomReservationService\" ) endpoint ( address ...

WCF Tutorial, Part 4: Service Implementation

01. December 2013 WCF 0
Create a WCF Service Library and name it RoomReservationService. Add references to RoomReservationContracts RoomReservationData Remove the Data Contract class and modify the RoomReservationService.cs as bellow: [crayon-59253b594dd93197192631/] The service class RoomReservationService implements the interface IRoomService. The service is implemented just by invoking the appropriate methods of the RoomReservationData class. Following figure shows the assemblies we have ...