I have two WCF clients consuming a 3rd party web service.
These two clients execute the same method call. In the one case it works every time, in the other I get the "There was no endpoint listening ..." message.
As far as I can tell, the only difference between the two calls is that they are in two different client exes, and that means that the .exe.config files are not the same. They use the same source code, which is shared between the two projects in Visual Studio, so that's not different.
But in fact the content of those two exe.config files is (almost) exactly the same; the only difference is that the exe.config for the call that fails has bigger values for the maxBufferSize and maxReceivedMessageSize attributes of the binding element, as well as a larger sendTimeout value.
This isn't really an answer, it's an explanation.
The problem is that of the two clients above, one was a desktop Windows Forms app, and the other a Windows Service. They both used the same code base (i.e. instance of a class), and nearly the same app.config files.
BUT the service logged in under the SystemAccount - and at some sites this doesn't seem to have the rights/profile to access the internet, and so it could not find the web service endpoint. Obvious. When you know.