我得到这个EndpointNotFoundException
Web服务调用一个网站,而同样的确切的调用工程,如果我从控制台应用程序。 这里的更详细的异常消息:EndpointNotFoundException在Web服务调用网站,但不是从控制台应用程序
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.
我已经证实,绑定(在web.config
和app.config
)都是一样的,所以我不明白为什么它工作在一种情况下,而不是在其他。
<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>
让我知道你是否需要任何更多的细节。
编辑
好的,这里是我遗漏的可能导致问题的东西。这一切都发生在公司防火墙后面。 难道说防火墙阻止它从网站运行,因为它是从现有“web进程”产生的HTTP连接?而在控制台应用程序,它只是一个单一的连接。
哪里的网站连接服务添加一个代理绕过?在与控制台应用程序相同的机器上? – Aaronaught 2010-02-17 17:24:52
是的,他们都在同一台机器上运行。尽管如此,web服务不在同一台机器上。 – Farinha 2010-02-18 08:30:01