I am able to connect to a remote WCF service from a console or a website/webapplication running on a VS dev server successfully. However, when I try to connect from an IIS hosted website I'm getting the following error. Any idea?
No connection could be made because the target machine actively refused it 12.11.121.12:80
This error:
No connection could be made because the target machine actively refused it
Means that a connection request successfully got through to the target machine (it isn't a firewall issue), on a given port and the target machine was not listening for incoming connections on that port, so the OS refused the connection attempt.
The rest of your error identifies the machine 12.11.121.12
and the port number 80
that the connection was attempted on.
The error indicates that a server isn't running on the target machine. If you know a server is running on the machine you're attempting to connect to, because you can connect to it from another application, then this suggests that your connection details are misconfigured in the website.
So, some things to check:
someserver.org
for example rather than 12.11.121.12
and it is being resolved to a different IP because one server is external facing and the other is internal?If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With