This project is read-only.

Configuring the Wcf Transport Service

This page explains how you can configure the Wcf Transport Service, either by config string or by fluent interface.

Config String

With the config string the following options can be configured:
  • wcf.port: Configures the tcp port that should be used to handle incoming communication (by default the netTcpBinding is used).
  • wcf.name: Configures the name of the transport service. A name should be assigned if the space instance uses multiple transport services.
  • wcf.isdefault: Configures if the transport service is used by default for connecting to other workers (one service should be configured as default, if multiple transport services are used).
Here is an example:
var space = new XcoAppSpace("wcf.port=9000;wcf.name=wcfservice;wcf.isdefault=true");

Fluent Inferface

The fluent interface provides methods equal to the config string elements:
  • OnPort(int port): Configures the tcp port that should be used to handle incoming communication (by default the netTcpBinding is used).
  • WithName(string name): Configures the name of the transport service. A name should be assigned if the space instance uses multiple transport services.
  • AsDefault(): Configures that the transport service is used by default for connecting to other workers (one service should be configured as default, if multiple transport services are used).
  • WithSerializer(string name): Allows defining which serializer is used for this transport service, if there are multiple named serializers defined for this appspace instance (use the .WithName() fluent config method to define the serializer name). Note: this is only needed if you have multiple transport services, and want to communicate using a different serializer for each of them.
Here is an example:
XcoAppSpace space = XcoAppSpace.Configure.UsingService<XcoWCFTransportService>().OnPort(9000).WithName("wcfservice").AsDefault();

Further Wcf Configuration

By default the Wcf transport service uses the netTcpBinding. If you want to define another binding, or set other Wcf-based options for the transport service, you can use the app config for this. You can find the following examples on how to alter the Wcf configuration in the usage demos (see the download section):
  • nettcp binding with custom configuration
  • netpipe binding
  • wshttp binding with message encryption
  • shared ports
  • communication over azure
  • hosting a wcf service in iis

Last edited Dec 21, 2012 at 1:57 PM by thomass, version 4

Comments

No comments yet.