I'm getting this EndpointNotFoundException
on a webservice call from a website, while the same exact call works if I do it from a console application.
Here's the more detailed exception message:
Could not connect to https://******. TCP error code 10060:
A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond ***.***.***.***:443.
I've confirmed that the bindings (in web.config
and app.config
) are the same, so I can't see why it works in one case and not in the other.
<basicHttpBinding>
<binding name="ServicePortBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
Let me know if you need any more details.
EDIT
OK, here's something I left out that might be causing the issue. This is all happening behind the company firewall.
Could it be that said firewall is preventing it from running from the website because it's an HTTP connection spawned from an existing "web process"? Whereas in the console app it's just a single connection.