是否可以覆盖 .NET 客户端调用 Web 服务的默认超时?

发布于 2024-07-07 10:35:43 字数 29 浏览 4 评论 0原文

我希望 Web 服务代理类等待 2 分钟以上

I'd like the web service proxy class to wait more than 2 minutes

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

只等公子 2024-07-14 10:35:43

需要考虑两件事 - 是的,TheSoftwareJedi 关于在代理上设置超时属性的做法是正确的 - 很简单。 默认值为 100 秒。

您还必须意识到 IIS 也将具有超时设置,并且如果达到超时设置,它将覆盖 C# 设置。 IIS 默认为 120 秒。

因此,在代理上设置超时属性将使您在开始达到 IIS 超时之前多等待 20 秒。

Two things to think about - yes, TheSoftwareJedi is correct about setting the Timeout property on the proxy - easy enough. The default value for that is 100s.

You also have to realize that IIS will have a timeout setting as well and it will override the c# setting if its reached. The IIS default is 120s.

So, setting the timeout property on the proxy will get you an additional 20s before you start hitting the IIS timeout.

兔姬 2024-07-14 10:35:43

只需设置超时属性 在代理上

Just set the timeout property on the proxy

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文