Documentation Center

Creating a custom binding

If you want to connect to the Core Service using an endpoint other than the default NetTcpBinding or wsHttpBinding bindings, you can create a custom binding.

Core Service
The Core Service is an API for interacting with the Content Manager through a Web service using the Windows Communication Foundation (WCF) standard. Audience Manager and Outbound E-mail connect to the Content Manager through the Core Service. The following diagram shows a standard installation where a WCF client, combining Audience Manager and Outbound E-mail, is installed on the same server as the Content Manager Server:
  • The Content Manager Server runs as a Web application in Internet Information Services (IIS).
  • The Core Service runs in a virtual directory if you connect to it using HTTP (if you connecti using NET.TCP, the Core Service runs as a Windows service).
  • Audience Manager and Outbound E-mail also run in a virtual directory within the Content Manager Server Web application.
Audience Manager and Outbound E-mail default connectivity to the Core Service
Audience Manager and Outbound E-mail connect to the Core Service via an endpoint. Audience Manager and Outbound E-mail provide out-of-the-box endpoints for connecting to the Core Service using the NetTcpBinding or wsHttpBinding bindings which use respectively the net.tcp and http protocols to communicate with the Core Service.
Creating a custom binding for Audience Manager and Outbound E-mail
If you want to connect to the Core Service using an endpoint other than the default NetTcpBinding or wsHttpBinding bindings, or if you want to specify your own binding properties for these protocols, you need to develop your bindings and endpoints.
In web.config, in the <system.serviceModel> section, define an <endpoint> element:
<client>
	<endpoint name="amNetTcp" 
		address="net.tcp://ServerName.Domain:2660/CoreService/2012/netTcp" 
		binding="netTcpBinding" 
		bindingConfiguration="amNetTcp" 
		contract="AudienceManagerCoreServiceProxy.ISessionAwareCoreService" /> 
</client>

where:

  • name specifies the name of the endpoint
  • address specifies the URI where WCF clients can access this Core Service endpoint
  • binding specifies either a default binding such as netTcpBinding or a custom binding
  • bindingConfiguration specifies the name attribute of the binding element used to change the default values of a binding
  • contract specifies the interface that defines the contract. When you develop your own binding to connect to the Core Service for Audience Manager and Outbound E-mail, you need to specify the following endpoint contract:
contract="AudienceManagerCoreServiceProxy.ISessionAwareCoreService"