I need to test WCF service, but have only one computer, so my service and client are running on the same machine. Here is the App.config of WCF Service:
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/MyService"/>
</baseAddresses>
</host>
<endpoint address=""
binding="wsDualHttpBinding"
contract="MyService.IMyService"/>
I need to connect to this service from my client by IP, so i tried following:
MyClient.Endpoint.Address =
new System.ServiceModel.EndpointAddress(
new Uri("http://" + IP + "/" + Port + "/MyService"));
where IP = "127.0.0.1" and Port = "8000". I also tried to use my real IP address instead of 127.0.0.1 but it doesn't work anyway - client cann't connect to service.
- Does it possible to connect by IP if I use wsDualHttpBinding, and if yes,
- What Endpoint.Address should I specify for it