Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
896 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...