Configuration - TcmExtensions/TcmCDService GitHub Wiki
The TcmCDService configuration is done through the standard .NET configuration system.
First the TcmCDService configuration section needs to be declared:
<configSections>
<section name="TcmCDService" type="TcmCDService.Configuration.Config, TcmCDService.Common" />
</configSections>
TcmCDService can be installed as a service by executing it with the parameter "-install".
De-installation and removal of TcmCDService is done with "-remove".
The main TcmCDService configuration can be found under the TcmCDService node:
<!-- defaultCacheExpiry is the number of minutes cache items expire when no cache events are processed -->
<TcmCDService defaultCacheExpiry="5" tridionHome="D:\Workspace\Code\Tridion" tridionConfiguration="D:\Workspace\Code\Tridion\config\development" useLocalTime="false">
<!-- NullCache does not cache any items retrieved from Tridion Content Delivery -->
<cacheType type="TcmCDService.CacheTypes.NullCache, TcmCDService.Common" />
Here the Tridion home directory, along with an optional Tridion configuration directly can be specified.
Additionally the timestamp in the log files can be toggled between UTC or local machine time.
TcmCDService can make use of a one single cacheType at a time, which is defined as a child node.
In the above example the default NullCache cache type is activated, which does not supply any caching logic.
Also it is possible to enable the AbsoluteCache cache type:
<!-- AbsoluteCache caches items with a absolute expiration of "defaultCacheExpiry" -->
<cacheType type="TcmCDService.CacheTypes.AbsoluteCache, TcmCDService.Common" />
Configuration help for other more advanced cache types can be found in the left hand navigation sidebar.
Since TcmCDService exposes a WCF service, the WCF service bindings need to be configured for the service.
<system.serviceModel>
<bindings>
<customBinding>
<binding name="basicHttp">
<textMessageEncoding messageVersion="Soap11" />
<httpTransport hostNameComparisonMode="Exact" maxBufferSize="262144" maxReceivedMessageSize="262144" maxBufferPoolSize="262144" decompressionEnabled="true" keepAliveEnabled="true" />
</binding>
<binding name="wsHttp">
<textMessageEncoding />
<httpTransport hostNameComparisonMode="Exact" maxBufferSize="262144" maxReceivedMessageSize="262144" maxBufferPoolSize="262144" decompressionEnabled="true" keepAliveEnabled="true" />
</binding>
<binding name="netTcp">
<binaryMessageEncoding />
<tcpTransport hostNameComparisonMode="Exact" maxBufferSize="262144" maxReceivedMessageSize="262144" maxBufferPoolSize="262144" />
</binding>
<binding name="netNamedPipe">
<binaryMessageEncoding />
<namedPipeTransport hostNameComparisonMode="Exact" maxBufferSize="262144" maxReceivedMessageSize="262144" maxBufferPoolSize="262144" />
</binding>
</customBinding>
</bindings>
</system.serviceModel>
Both the TCP transport and the named pipe transport make use of binary message encoding to establish a fast means of communication.
Named pipes transport is the preferred method when TcmCDService is accessed on the same machine, for intra-machine connectivity TCP transport is the optimal solution.
The Basic Http and wsHttp provide connectivity with legacy clients and/or other platform technologies such as Java.
<services>
<service name="TcmCDService.Service" behaviorConfiguration="TcmCDServiceBehavior">
<clear />
<endpoint bindingNamespace="" binding="customBinding" contract="TcmCDService.Contracts.IService" address="TcmCDService/basic" bindingConfiguration="basicHttp" />
<endpoint bindingNamespace="" binding="customBinding" contract="TcmCDService.Contracts.IService" address="TcmCDService" bindingConfiguration="wsHttp" />
<endpoint bindingNamespace="" binding="customBinding" contract="TcmCDService.Contracts.IService" address="TcmCDService" bindingConfiguration="netTcp" />
<endpoint bindingNamespace="" binding="customBinding" contract="TcmCDService.Contracts.IService" address="TcmCDService" bindingConfiguration="netNamedPipe" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:12001" />
<add baseAddress="net.tcp://localhost:12002" />
<add baseAddress="net.pipe://localhost" />
</baseAddresses>
</host>
</service>
</services>
By default the TcmCDService listens to port 12001 and 12002, but this can be modified by configuring the WCF endpoint configuration accordingly.
Detailed logs can be obtained from TcmCDService by configuring the logging file accordingly.
<system.diagnostics>
<sources>
<!--
Control log level by setting the switchValue to:
- Verbose
- Information
- Warning
- Error
-->
<source name="TcmCDService" switchValue="Verbose">
<listeners>
<remove name="Default"/>
<add name="FileLogListener" type="TcmCDService.Logging.RolloverTraceListener, TcmCDService.Common" initializeData="F:\temp\TcmCDService.log" />
</listeners>
</source>
</sources>
<trace autoflush="true" indentsize="2" />
</system.diagnostics>