title: Call WCF service without knowing the contract
body: <p>I try to do the following:</p>
  
  <p>I have a Windows service which is running a TCP WCF service.</p>
  
  <p>Now, I want to implement a client, which can connect to this service. But this client doesn't know the contract of the service. He knows that the service does provide a method <code>Download (string path)</code>. I want to connect to the service and call <code>Download("c:\\temp\\xxx.exe")</code>.</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>var myBinding = new NetTcpBinding(SecurityMode.None)
  {
      TransferMode = TransferMode.Streamed,
      MaxBufferPoolSize = 524288,
      MaxBufferSize = 2147483647,
      MaxConnections = 254,
      MaxReceivedMessageSize = 2147483647,
      PortSharingEnabled = true
  };
  
  var myEndpoint = new EndpointAddress("net.tcp://localhost:6648/InstallerBootstrapperService");
  
  var myChannelFactory = new ChannelFactory&lt;IInstallerBootstrapperService&gt;(myBinding, myEndpoint);
  
  IInstallerBootstrapperService client = null;
  
  try {
      client = myChannelFactory.CreateChannel();
      client.Download("c:\\temp\\xxx.exe");
      ((ICommunicationObject) client).Close();
  } catch {
     if (client != null) {
          ((ICommunicationObject) client).Abort();
     }
  }
  </code></pre>
  
  <p>But this throw an Exception when I call <code>Download()</code>. It says:</p>
  
  <blockquote>
    <p>The message with Action
    'Prayon.Service.Library/IInstallerBootstrapperService/Download' cannot
    be processed at the receiver, due to a ContractFilter mismatch at the
    EndpointDispatcher. This may be because of either a contract mismatch
    (mismatched Actions between sender and receiver) or a binding/security
    mismatch between the sender and the receiver.  Check that sender and
    receiver have the same contract and the same binding (including
    security requirements, e.g. Message, Transport, None).</p>
  </blockquote>
  
  <p>Is there a way that I can call the service method without knowing the contract? Can I change something on the service side, that this client can always call the method?</p>