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.