I have a WCF client and service using HTTPS over the wsHttpBinding.
One common setup has the client and server components on the same machine. The client has to set the endpoint address to include the server's machine name, rather than localhost for SSL reasons i.e. https://mymachine/myservice/service.svc
The problem is, that the default IIS has an IP restriction whitelist to 127.0.0.1 only. If I browse the svc file in IE7, this works, but when using the WCF client I can see in the IIS logs, that the the WCF server receives messages from the WCF client's network/real IP address, rather than 127.0.0.1, and therefore the client is rejected.
Does anyone know why the WCF client is communicating locally, using the network IP, rather 127.0.0.1, and can this be changed?
Any other workarounds are appreciated, but I'm really looking to avoid changing the SSL setup, or overhauling the bindings. The simplest solution appears to be to update the whitelist on system restart with the clients new IP.
Note that I have tried adding my machinename, with IP 127.0.0.1 in the hosts file, but this hasn't had an effect.