WCF server-side timeout

前端 未结 4 1945
时光取名叫无心
时光取名叫无心 2020-12-18 11:22

Is there a way to tell a WCF service to response to a request (with or without aborting it\'s processing) after a certain amount of time, even if it didn\'t finish yet, some

4条回答
  •  情歌与酒
    2020-12-18 12:13

    I have solved the same problem and created a blog post:

    http://kanchengcao.blogspot.com/2012/06/adding-timeout-and-congestion.html

    In short:

    1. WCF server timeout config do not work
    2. You could implement a timeout as others said
    3. Such a timeout does not guarantee a timely response to the client, since the request could be queued for long before entering your code with timeout.

    So I implemented method to drop requests if the server is overloaded and is expected to cause more timeouts.

提交回复
热议问题