Getting WCF Cache Service working

Topics: MMC SnapIn, WCF Cache Service
May 17, 2012 at 7:41 PM

I've downloaded the WCF Cache Service and followed the video tutorial for its setup and for the life of me can't get it to work properly.  By "work", I mean the following:

  1. Any attempt whatsoever to Invalidate the WCF Cache Service from within the NetSqlAzMan Console fails with "The communication object, System.ServiceModel.Channels.Servicechannel, cannot be used for communication because it is in the Faulted state." This was for net.ctp and the http protocol generates the following error: "The provided URI scheme 'http' is invalid; expected 'net.tcp'. Parameter name: via".
  2. Any attempt to add a service reference in VS2010 by typing in the address and clicking Go fails and it can't find the service.  This goes both for net.tcp and http.
  3. Any attempt to access the service directly in the browser via the http protocol has failed as well.

A couple points to make here...

  • I noticed that the error message I'm getting was a bug in previous versions so I uninstalled and reinstalled with the latest version where it was supposedly resolved but no cigar.  This was first done with the x86 version.  I then tried again with the x64 version.
  • The service starts up properly and I can verify that it is running
  • There appear to be valid endpoints (though I'm far from a WCF expert) and I started with the defaults that get included with the install only changing the database as done in the instructional video but couldn't seem to get that configured.
  • This server (and the client accessing it) are inside our corporate firewall and thus no ports should be restricted

Here is my config file (though I've played with several varieties) of NetSqlAzManCacheService.exe.config:

<?xml version="1.0"?>
    <add name="NetSqlAzMan.Cache.Service.Properties.Settings.NetSqlAzManStorageCacheConnectionString" connectionString="Data Source=dev03wdet\sqlexpress;Initial Catalog=NetSqlAzManStorage;Integrated Security=True" providerName="System.Data.SqlClient"/>
    <add key="expirationValue" value="0 1 0 0"/>
    <!-- days hours minutes seconds -->
    <add key="StoreNameFilter" value=""/>
    <!-- Syntax "Store1;Store" or leave empty for all Stores -->
    <add key="ApplicationNameFilter" value=""/>
    <!-- Syntax "Application1;Application" or leave empty for all Applications -->
    <add key="WCFCacheServicePartners" value=""/>
    <!-- WCF Cache Service Partners (Endpoint1;Endpoint2;...); Invalidate Cache will be invoked on all other partners -->
    <!-- net.tcp://otherserver1:8000/NetSqlAzMan.Cache.Service/CacheService/;net.tcp://otherserver2:8000/NetSqlAzMan.Cache.Service/CacheService/-->
    <!-- leave empty if no ServicePartners -->
    <add key="AsyncCacheBuilding" value="true"/>
    <!-- WCFCacheServicePartner Client EndPoint -->
      <endpoint address="net.tcp://"
          binding="netTcpBinding" bindingConfiguration="NetTcpBinding_ICacheService"
          contract="NetSqlAzManWCFCacheService.ICacheService" name="NetTcpBinding_ICacheService">
          <userPrincipalName value="" />
        <binding name="NetTcpBinding_ICacheService1" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
          hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288"
          maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
            enabled="false" />
          <security mode="Transport">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows" />
        <binding name="WSHttpBinding_ICacheService" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          bypassProxyOnLocal="true" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
          textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
            enabled="false" />
          <security mode="Message">
            <transport clientCredentialType="Windows" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
              algorithmSuite="Default" establishSecurityContext="true" />
        <behavior name="NetSqlAzMan.Cache.Service.HTTPCacheServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100"/>
        <behavior name="NetSqlAzMan.Cache.Service.NETTCPCacheServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500"/>
      <!-- HTTP SERVICE -->
      <service behaviorConfiguration="NetSqlAzMan.Cache.Service.HTTPCacheServiceBehavior"
                <endpoint address="" binding="wsHttpBinding" contract="NetSqlAzMan.Cache.Service.ICacheService" />
                        <add baseAddress="" />
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

      <!-- NET TCP SERVICE -->
      <service behaviorConfiguration="NetSqlAzMan.Cache.Service.NETTCPCacheServiceBehavior" name="NetSqlAzMan.Cache.Service.CacheService">
        <endpoint address="net.tcp://" binding="netTcpBinding" contract="NetSqlAzMan.Cache.Service.ICacheService"/>
        <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
            <add baseAddress="net.tcp://"/>
            <add baseAddress=""/>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>


I've installed the WCF Cache Service on a Windows Server 2008R2 64 bit machine and the Console is on the same machine.  I've tried accessing the client (VS2010) through a Windows 7 64 bit machine.  I've tried both the 32 bit and 64 bit versions of both the Console (snap-in) and WCF service and currently have the 64 bit versions on both the server and client.

May 21, 2012 at 5:24 PM


May 21, 2012 at 8:09 PM

Check that the “Net.Tcp Listener Adapter” Service is started.

Check also that a “telnet yourmachinename 8000” returns something.

Andrea Ferendeles
NetSqlAzMan Project Coordinator
E-mail Web

Oct 18, 2013 at 7:25 AM
Did you find any solution to this problem? I have exactly the same case.