I need to check the WCF service, but only have one computer, so my service and client work on the same computer. Here is the WCF service app.config:
<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 over IP, so I tried the 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 still doesn’t work - the client cannot connect to the service.
- Is it possible to connect via IP, if I use wsDualHttpBinding, and if so, then
- Which endpoint .Address should be specified for it
source
share