title: The Address property on ChannelFactory.Endpoint was null. The ChannelFactory's Endpoint must have a valid Address specified
body: <p>I have hosted by WCF service on a URL (<a href="http://192.168.2.131:8089/" rel="nofollow">http://192.168.2.131:8089/</a>). Now, I'm trying to invoke the WCF service from a Windows form, but I'm getting this error:</p>
  
  <blockquote>
    <p>The Address property on ChannelFactory.Endpoint was null.  The ChannelFactory's Endpoint must have a valid Address specified.</p>
  </blockquote>
  
  <p>Here is the win form C# code:</p>
  
  <pre><code>var binding = new WSDualHttpBinding();
  
  var endpoint = new EndpointAddress("http://192.168.2.131:8089/");
  
  InstanceContext context = new InstanceContext(new Form1());
  
  var cFactory = new DuplexChannelFactory&lt;IPubSubService&gt;(context);
  
  IPubSubService client = null;
  client = cFactory.CreateChannel();
  client.SendNotification();
  </code></pre>
  
  <p><code>client = cFactory.CreateChannel();</code> is throwing the error.</p>
  
  <p>Here is the <code>system.serviceModel</code> config for the WCF service and the Winforms <code>app.config</code>:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
     &lt;services&gt;
       &lt;service name="PubSubServiceLib.PubSubService"&gt;
          &lt;endpoint 
              address="" 
              binding="wsDualHttpBinding"
              contract="PubSubServiceLib.IPubSubService"&gt;
          &lt;/endpoint&gt;
          &lt;host&gt;
             &lt;baseAddresses&gt;
                &lt;add baseAddress="http://192.168.2.131:8089/"/&gt;
             &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
     &lt;/services&gt;
     &lt;bindings&gt;
        &lt;wsDualHttpBinding&gt;
           &lt;binding receiveTimeout="00:30:00" sendTimeout="00:30:00" 
                    maxReceivedMessageSize="2147483647"&gt;
              &lt;reliableSession inactivityTimeout="02:00:00"/&gt;
           &lt;/binding&gt;
        &lt;/wsDualHttpBinding&gt;
     &lt;/bindings&gt;
     &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
           &lt;behavior&gt;
              &lt;serviceMetadata httpGetEnabled="True"/&gt;
              &lt;serviceDebug includeExceptionDetailInFaults="False"/&gt;
           &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
     &lt;/behaviors&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>