You can get it from the proxy server of the client that was generated for you:
using (var client = new ServiceReference1.MyServiceClient("*")) { string address = client.Endpoint.Address.Uri.ToString(); }
or if there are several endpoints in your configuration file:
using (var client = new ServiceReference1.MyServiceClient("MyService")) { var address = client.Endpoint.Address.Uri.ToString(); }
source share