Thanks again,
but le me be clear that I am not connecting to a wcf service. I am trying to start a one.
And I tried that Before trying to start it network connection has acquired IP. I have written below code to start the service.
Dim baseAddress As Uri = New Uri("http://localhost:8080/me/myService")
Dim selfHost As New ServiceHost(GetType(WCFService), baseAddress)
selfHost.AddServiceEndpoint(GetType(MyContract.IServerManager), New WSHttpBinding(SecurityMode.None), "WCFService")
Dim smb As New ServiceMetadataBehavior()
smb.HttpGetEnabled = True
selfHost.Description.Behaviors.Add(smb)
selfHost.Open()