WCF/WF - No DNS entries exist for host locolhost : in case of net.tcp binding only?

Asked By brahma naidu on 24-Jul-12 08:09 AM

using (ServiceReference1.ourserviceClient proxy = new ServiceReference1.ourserviceClient("NetTcpBinding_ourservice"))
            {
          2nd line***    // proxy.Endpoint.Address = new System.ServiceModel.EndpointAddress(new Uri("net.tcp://localhost:71/Service"));

                int j=proxy.GetSum(15, 15);---gives an error: No DNS entries exist for host locolhost.
                Console.WriteLine("Net.TCP: 15 + 15 is " + j);                          
                proxy.Close();
               // proxy.Endpoint.Binding //System.ServiceModel.NetTcpBinding
            }
in the above code comment the 2nd line:
          proxy.Endpoint.Address = new System.ServiceModel.EndpointAddress(new Uri("net.tcp://localhost:71/Service"));


if i uncomment this line working fine and  incase of wsHttpbinding also working fine[ no error]
please explain.

Peter Bromberg replied to brahma naidu on 24-Jul-12 08:25 AM
Localhost is always 127.0.0.1
No DNS lookup is necessary for this.
brahma naidu replied to Peter Bromberg on 24-Jul-12 08:56 AM

Hi Peter sir! same error

  <endpoint address="net.tcp://locolhost:71/service" binding="netTcpBinding"
                bindingConfiguration="NetTcpBinding_ourservice" contract="ServiceReference1.ourservice"
                name="NetTcpBinding_ourservice">
                <identity>
                    <userPrincipalName value="kasibabu_p@zolt.dc" />
                  <dns value="127.0.0.1"/>
                </identity>
            </endpoint>

even also same error for net.tcp binding and why dns always 127.0..01 only[ this is not my system ip address]
my ip is :192.168.55.131
i specified 
    <dns value="192.168.55.131 "/> 
even also error is same