WCF 服务绑定 - 超时配置
服务-WCF服务
主机 - Windows 服务
客户端 - ASP.Net Web 应用程序
我在客户端(Web 应用程序)的 .config 文件中看到以下设置 -
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
任何人都可以确认我对这些超时配置的理解 -
closeTimeout="00:01:00"
如果客户端发送“关闭”,客户端应用程序将引发错误' 请求和服务需要超过 1 分钟才能正常关闭。
openTimeout="00:01:00"
如果客户端发送“打开”请求并且服务打开时间超过 1 分钟,客户端应用程序将引发错误。
receiveTimeout="00:10:00"
如果服务发送响应并且客户端接收整个响应的时间超过 10 分钟,客户端应用程序将引发错误。
sendTimeout="00:01:00"
如果客户端尝试发送请求并且客户端将该请求传输到服务的时间超过 1 分钟,客户端应用程序将引发错误。
请指导。
Service - WCF Service
Host - Windows Service
Client - ASP.Net Web application
I saw following settings in .config file of client (web application) -
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
Can anyone please confirm my undersanding for these Timeout configurations -
closeTimeout="00:01:00"
An error will be thrown by client app if client sends a 'close' request and service takes longer than 1 minute to close gracefully.
openTimeout="00:01:00"
An error will be thrown by client app if client send an 'open' request and service takes longer than 1 minute to open.
receiveTimeout="00:10:00"
An error will be thrown by client app if service sends a response and it takes longer than 10 minutes for the client to receive the entire response.
sendTimeout="00:01:00"
An error will be thrown by client app if client attempts to send a request and it takes longer than 1 minute for the client to transmit that request to service.
Please guide.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我几乎可以证实你的分析,除了 receiveTimeout 之外。我认为应该表述为:
据我所知,这也是为什么默认情况下将此时间设置为 10 分钟而不是像其他超时那样设置为 1 分钟的原因。
I can almost confirm your analysis, except for the receiveTimeout. I think it should be stated as:
To my knowledge, this is also the reason why, by default, this time is set to 10 minutes instead of 1 minute like for the other timeouts.