title: wcf System.ServiceModel.AddressAlreadyInUseException
body: <p>Apologies if this question appears twice on stackOverflow</p>
  
  <p>Im trying to run a wcf service on a windows server 2003 box. Im getting a <strong>System.ServiceModel.AddressAlreadyInUseException</strong> exception when the servicehost calls Open() and it tells gives me the following error:</p>
  
  <blockquote>
    <p>HTTP could not register URL <a href="http://+:8080/LogoResizer/mex/" rel="nofollow noreferrer">http://+:8080/LogoResizer/mex/</a> because TCP port 8080 is being used by another application</p>
  </blockquote>
  
  <p>Ive read that I need to use the httpcfg.exe to register my namespace and Ive used the GUI tool found <a href="http://blogs.msdn.com/paulwh/archive/2007/05/04/addressaccessdeniedexception-http-could-not-register-url-http-8080.aspx" rel="nofollow noreferrer">here</a> to do it but I still get the above exception. Running "netstat -a" doesnt show anything else listening on port 8080 and running "httpcfg.exe query urlacl" returns me the following registered namespaces.</p>
  
  <blockquote>
    <p>C:\Program Files\Support Tools>httpcfg query urlacl
        URL : <a href="http://+:80/Temporary_Listen_Addresses/" rel="nofollow noreferrer">http://+:80/Temporary_Listen_Addresses/</a></p>
    
    <h2>    ACL : D:(A;;GX;;;WD)</h2>
  </blockquote>
  
  <pre><code>URL : http://+:8080/LogoResizer/
  </code></pre>
  
  <h2>    ACL : D:(A;;GX;;;WD)</h2>
  
  <pre><code>URL : http://+:8080/LogoResizer/mex/
  </code></pre>
  
  <h2>    ACL : D:(A;;GX;;;WD)</h2>
  
  <p>The config for my app is as below:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;bindings&gt;
          &lt;netTcpBinding&gt;
              &lt;binding name="NetTcpBinding_ImageResizerServiceContract" 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="2147483647" maxBufferSize="2147483647" maxConnections="10"
                  maxReceivedMessageSize="2147483647"&gt;
                  &lt;readerQuotas maxDepth="2147483647"
                                maxStringContentLength="2147483647"
                                maxArrayLength="2147483647"
                                maxBytesPerRead="2147483647"
                                maxNameTableCharCount="2147483647" /&gt;
                  &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt;
                  &lt;security mode="Transport"&gt;
                      &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /&gt;
                      &lt;message clientCredentialType="Windows" /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
  
          &lt;/netTcpBinding&gt;
      &lt;/bindings&gt;
      &lt;behaviors&gt;
          &lt;serviceBehaviors&gt;
              &lt;behavior name="ServiceBehavior"&gt;
                  &lt;serviceMetadata httpGetEnabled="true" /&gt;
                  &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
              &lt;/behavior&gt;
          &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;services&gt;
          &lt;service name="LogoResizer.WCF.ServiceTypes.ImageResizerService" behaviorConfiguration="ServiceBehavior"&gt;
              &lt;host&gt;
                  &lt;baseAddresses&gt;
                      &lt;add baseAddress="http://localhost:900/mex/"/&gt;
                      &lt;add baseAddress="net.tcp://localhost:9000/" /&gt;
                  &lt;/baseAddresses&gt;
              &lt;/host&gt;
              &lt;endpoint bindingConfiguration="NetTcpBinding_ImageResizerServiceContract" binding="netTcpBinding" contract="LogoResizer.WCF.ServiceContracts.IImageResizerService" /&gt;
              &lt;endpoint  address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt;
          &lt;/service&gt;
      &lt;/services&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Does anyone have any idea what Im doing wrong or how I can register my namespace so I can have a http endpoint for my service?</p>