Reputation: 1600
HI,
I know this is a very common question in case of .Net, but a weird thing is happening. My friend has a wcf service hosted in IIS. I am able to connect to his service by
http://172.16.70.129/newwebsite/eval.svc
Also, when I use wcftestclient to access the service, it is able to get the metadata and download the operations that the service exposes. But, when I try to invoke the operations, I get an error that
"There was no endpoint listening at http://localhost/newwebsite/eval.svc/basic that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."
He is able to access it in his computer from the wcftestclient, but I am unable to do so. We both are within same wifi connection. And both our firewalls are turned off. Does anybody have a solution to this?
Upvotes: 0
Views: 1245
Reputation: 46052
If I understand correctly, the WCF service is running on your friend's machine. The localhost
in the endpoint is trying to reference the service as if it's on your own machine. To fix this, replace localhost
with 172.16.70.129
in the endpoint.
Upvotes: 1