title: wcf service host run only on port number 8080
body: <p>I have a wcf service and used a console app as the host for my service. when I use base address like this: <code>&lt;baseaddres ="http://ipaddress:8080/" /&gt;</code>. When I check my service operation through a web browser I can open the service WSDL and it works fine.</p>
  
  <p>But, as I change the port number to something else. The service host starts fine (with no exception of used port number or anything else). As I go to check if the service is running through web browser the service is not shown. eventually my client also could not locate the service.</p>
  
  <p>app.config configuration</p>
  
  <pre><code>    &lt;services&gt;
    &lt;service name="Natatorium_WCF.NatatoriumService"
             behaviorConfiguration="ServiceBehavior"&gt;
      &lt;endpoint address="NatatoriumService"
                binding="wsHttpBinding"
                contract="Natatorium_WCF.INatatoriumService"
                bindingConfiguration="wsHttpBindingConfig"&gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="NatatoriumService"
                binding="netTcpBinding"
                contract="Natatorium_WCF.INatatoriumService"
                bindingConfiguration="netTcpBindingConfig" &gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="mex"
                binding="mexHttpBinding"
                contract="IMetadataExchange"/&gt;
      &lt;host&gt;
        &lt;baseAddresses&gt;
          &lt;add baseAddress="http://[ServerName]:[PortNO.1]"/&gt;
          &lt;add baseAddress="net.tcp://[ServerName]:[PortNO.2]"/&gt;
        &lt;/baseAddresses&gt;
      &lt;/host&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  </code></pre>
  
  <p>this is the host code to start the service (console application).</p>
  
  <pre><code> static void Main(string[] args)
      {
          ChangeServerConfigFileAttributeValue("8080", "8090");
          using (ServiceHost host = new ServiceHost(typeof(Natatorium_WCF.NatatoriumService)))
          {
              host.Open();
              Console.WriteLine("Listening...");
              Console.ReadLine();
          }
      }
  </code></pre>