0

When consuming WCF in a local environment, everything is working just fine.

But when consuming WCF hosted on some external location (Azure etc.), for request process that lasts longer than 1 minute, I get the error:

System.TimeoutException: 'The request channel timed out while waiting for a reply after 01:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.'

WebException: The remote server returned an error: (504) Gateway Timeout.

This error is showing after 1 minute, not after 1 hour as it says.

The service is using wsHttpBinding.

Any idea what could be a problem here?

user3239349
  • 877
  • 1
  • 12
  • 33
  • Are you able to reach the host in any way? Try `telnet `. Also, are you able to browse to the WCF URL in your internet browser? – tobypls Jan 23 '20 at 16:01
  • Yes. But when some request process is taking longer then 1 minute, this exception is catched. – user3239349 Jan 23 '20 at 16:03
  • What do the server and client side bindings look like? – tobypls Jan 23 '20 at 16:05
  • What is the authentication mode of the Wshttpbinding? By default, wshttpbinding authenticates the client with windows credentials without explicitly specifying the ClientCredentailType. I think there is something wrong with the authentication issue. Please try to set the authentication mode to None. WSHttpBinding binding = new WSHttpBinding(); binding.Security.Mode = SecurityMode.None; Or using Basichttpbinding. – Abraham Qian Jan 24 '20 at 04:17
  • has in Config file. – user3239349 Jan 24 '20 at 10:15
  • @user3239349 , Seems good, please ensure that binding configuration has been applied on the service endpoint. Can you generate the client proxy class properly by adding service reference? In addition, please post the complete configuration located on the server-side(System.servicemodel section). – Abraham Qian Jan 27 '20 at 02:46
  • here is a common explanation of HTTP 504 error. https://stackoverflow.com/questions/18665756/difference-between-operation-has-time-out-and-504-gateway-timeout – Abraham Qian Jan 27 '20 at 03:21

0 Answers0