EndpointNotFoundException in webservice call from website, but not from console application

I get this EndpointNotFoundExceptionin a webservice call from a website, while the same exact call works if I do this from a console application. Here's a more detailed error 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 confirmed that the bindings (in web.configand app.config) are the same, so I can’t understand why it works in one case and not in another.

<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 more details.


, - , . . , -, HTTP- "-"? .

+3
3

- web.config

  <system.net>
    <defaultProxy>
      <proxy
      usesystemdefault = "true"
      proxyaddress="http://theproxyaddress:PortNumber"
      bypassonlocal="false"
/>
    </defaultProxy>
  </system.net>

+4

wirehark ( Fiddler, HTTP), , ?

0

.

- ASPNET NETWORK, ( ).

?

Do you perform any authentication on the WCF server, which can work for a regular user account, but not for ASPNET / NETWORK SERVICE?

0
source

Source: https://habr.com/ru/post/1733238/


All Articles