Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
895 views
in Technique[技术] by (71.8m points)

wcf client - There was no endpoint listening at <URI> that could accept the message. This is often caused by an incorrect address or SOAP action

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...