I have a service wrapping an external API. When deploying to our test IIS7 servers I need to have the application pool run as a domain account with proxy permissions, if I don't then I get the following exception:
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [IP Address]
The IP address that 'actively refused' the connection is actually the target of the request, which I find confusing - if the application pool identity can't get through the proxy then how has the target machine refused the request?
I have the following block in web.config:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true"</defaultProxy>
</system.net>