【问题标题】:Why is my service timing out?为什么我的服务超时?
【发布时间】:2012-03-25 14:36:19
【问题描述】:

我有一个访问另一个 SOAP(第 3 方)服务的 WCF 服务。有时 SOAP 服务可以花时间返回数据。出于这个原因,我增加了从 WCF 服务连接到 SOAP 服务的超时时间。我做了以下更改:

在 WCF 服务的 web.config 中:

<system.web>
   <httpRuntime executionTimeout="600"/>
</system.web>

在实例化 SOAP 服务时的代码中,我执行以下操作:

service = new The3rdPartyService
{
   Url = "http://192.168.1.40:8080", 
   Timeout = 600000                // assuming this is in milliseconds
};

但是,调用在大约 100 秒后仍然超时。听起来我没有正确覆盖超时。

我错过了什么?

【问题讨论】:

  • 第三者超时100秒了吗??
  • WCF 服务有许多与绑定相关的不同配置,它们都有不同的超时时间。看到这个线程:stackoverflow.com/questions/229760/timeouts-wcf-services
  • @antar125 不,这不是第 3 方,因为我对 WebService 的调用是例外。

标签: asp.net wcf web-services .net-4.0 windows-server-2003


【解决方案1】:

您没有增加 WCf 服务的超时时间,您需要在客户端和服务器端的 WCF 服务绑定中这样做。看看这里Timeouts WCF Services。如果那是超时源,则不确定第三方soap调用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-06-25
    • 1970-01-01
    • 2013-12-28
    • 2010-11-02
    • 1970-01-01
    • 2021-05-25
    • 1970-01-01
    • 2015-01-17
    相关资源
    最近更新 更多