WCF timeout values on the server side seem not to do anything RRS feed

  • Question

  • The timeout values on the server side seem not to do anything. I host a WCF Service on IIS and have the following binding:

            <binding name="transactionalBinding" transactionFlow="true" sendTimeout="00:00:01" receiveTimeout="00:00:01" openTimeout="00:00:01" closeTimeout="00:00:01">
              <security mode="Transport">
                <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>

    In my service method I sleep for 10 seconds. I do not get a timeout exception when calling my service method from a client.

    I tested the above with https.

    Testing with http, I found out that receiveTimeout has an effect. I set receiveTimeout to 5 seconds and after 10 seconds (the sleep time of the service) I got the following exception on the client:

    An error occurred while receiving the HTTP response to http://localhost/WCFWEB/WCFWEB.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

    That means, that the receiveTimeout waits until the service finishes. When the service finishes, it throws an Exception. However this behaviour is not applied for the https protocol.

    Is there a reason why https behaves differently than http?

    • Edited by pappasa Thursday, June 13, 2019 12:06 PM
    Thursday, June 13, 2019 10:21 AM

All replies