This service is hosted on Win2k8 R2 with wshttp binding and all security options are disabled specifically. If I assign “All unassigned IP” in binding it is working well. However if I assign a specific IP, it fails during service reference ( wcftestclient Add service option) with message like Report from ‘DISCO Document’ is ‘There was an error downloading ‘http://abcd.xxxxx.net/Management/ManagementService.svc?disco’.’.
– The request failed with HTTP status 404: Not Found.
I see that it picks the machine name though we started with http://10.10.1.1/Milestone/Milestone.svc. I checked with ping that abcd is not mapping to 10.10.1.1 but another Ip of same machine 10.10.1.2.
How can I force WCF to use IP instead of machine name? Or is there any other way to address the scenario.
If you enter http://10.10.1.1/Milestone/Milestone.svc into a web browser, instead of WCFTestClient, does that work? Switching from IP to the machine name may just be something that WCFTestClient does, but that shouldn’t effect your eventual “real” clients, since they can use IP or server name.
I host my WCF services on Win 2k8 in IIS on a machine that has >1 IP, and it works fine, but in my case I bind WCF to only 1 IP address. It has been a while since I set that up, but I thought in the WCF configuration, and endpoint had to be bound to only 1 IP address. That IP should match what IIS is set to accept also. Alternatively, I think multiple endpoints can be created, one for each IP.