title: WCF - HTTP could not register URL http://+:80/
body: <p>My first post on Stackoverflow!</p>
  
  <p>I am having some problems with a WCF service I am trying to build and I need some help in trying to figure it out.</p>
  
  <p>There are two parts to the service, the first is a very simple REST style web service full of GET methods, this works fine.</p>
  
  <p>The next area is a Pub/Sub model which basically will push out to subscribers internally the results of a particular invoke method from the first area. To incorporate this I am listening on two endpoints, now every time I invoke one method on the PubSub service I get the error above. After searching the interwebulator I have seen a lot of posts saying that IIS is using port 80 by default.</p>
  
  <p>Now two questions:
   1. My service is listening on the following base address, nothing to do with 80
  <a href="http://localhost:3526/TradePortal" rel="nofollow">http://localhost:3526/TradePortal</a> and <a href="http://localhost:3526/TradePortal/Operations" rel="nofollow">http://localhost:3526/TradePortal/Operations</a>
   2. I would ideally host this in IIS </p>
  
  <p>The suggestion is I change the client base address to not use port 80, but is that set on the sever side or the client side config.</p>
  
  <p>I'm a bit puzzled as to the solution to this, I have previously built a pubsub model using NetTCP as the binding.</p>
  
  <p>Any clues as to how to solve this would be appreciated </p>
  
  <p>Server side config:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;services&gt;
          &lt;service behaviorConfiguration="Default" name="CFP_Web_Lib.TradePortal"&gt;
            &lt;host&gt;
              &lt;baseAddresses&gt;
                &lt;add baseAddress="http://localhost:3526/TradePortal"/&gt;
              &lt;/baseAddresses&gt;
            &lt;/host&gt;
              &lt;endpoint address="" binding="webHttpBinding"
                   contract="CFP_Web_Lib.ITradePortal"
                        behaviorConfiguration="web"
                   /&gt;
            &lt;endpoint address="Operations/" binding="wsDualHttpBinding"
                 contract="CFP_Web_Lib.ITradeOperations"/&gt;
                 &lt;/service&gt;
      &lt;/services&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="Default"&gt;
        &lt;serviceMetadata httpGetEnabled="true"/&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
  
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
    &lt;endpointBehaviors&gt;
      &lt;behavior name="web"&gt;
        &lt;webHttp/&gt;
      &lt;/behavior&gt;
      &lt;/endpointBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Client side code (auto generated by VS2010)</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;bindings&gt;
          &lt;wsDualHttpBinding&gt;
              &lt;binding name="WSDualHttpBinding_ITradeOperations" closeTimeout="00:01:00"
                  openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                  bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                  maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                  messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"&gt;
                  &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                      maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
                  &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" /&gt;
                  &lt;security mode="Message"&gt;
                      &lt;message clientCredentialType="Windows" negotiateServiceCredential="true" /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
          &lt;/wsDualHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="http://localhost:3526/TradePortal/Operations/"
              binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_ITradeOperations"
              contract="CFP_Web.ITradeOperations" name="WSDualHttpBinding_ITradeOperations"&gt;
              &lt;identity&gt;
                  &lt;userPrincipalName value="callison@cfpartners.local" /&gt;
              &lt;/identity&gt;
          &lt;/endpoint&gt;
      &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>