2013-05-13 76 views
0

我在IIS7上托管了WCF。当我尝试使用需要超过90秒才能产生结果的服务时,它会在90秒后超时。增加iis7上托管的WCF超时

  1. 在web配置,我有我的executionTimeout增加到900秒
  <system.web> 
     <compilation debug="false" strict="false" explicit="true" targetFramework="4.5" /> 
     <httpRuntime targetFramework="4.5" executionTimeout="900" shutdownTimeout="900" maxRequestLength="2097152" enable="true"/> 
     <pages> 
      <namespaces> 
      <add namespace="System.Runtime.Serialization"/> 
      <add namespace="System.ServiceModel"/> 
      <add namespace="System.ServiceModel.Web"/> 
      </namespaces> 
     </pages> 
     <customErrors mode="Off"/> 
    <trace enabled ="true" pageOutput ="true" requestLimit ="20" traceMode="SortByTime" />  
    </system.web>
  1. 在IIS的一面,我已经设置scriptTimeout至00:05: 10。 (默认网站 - > ASP的>限制属性 - > scriptTimeout)

  2. 在应用程序池,高级设置,我已经设置平最大响应时间为300秒(以及关闭时间限制。虽然我)

即使我增加了每个超时变量,我可以发现超过90秒,我的服务仍然超时在90秒。

任何人都知道我可能错过了超时?

回答

0

我从我的测试服务器上的配置中取得了这个...这个工程。你一定要改变这些值。

<binding name="tcp_unsecured_HighLimit" closeTimeout="23:59:59" openTimeout="23:59:59" receiveTimeout="23:59:59" sendTimeout="23:59:59" > 
     <readerQuotas maxDepth="104857600" maxStringContentLength="2000000000" maxArrayLength="2000000000" 
        maxBytesPerRead="2000000000" maxNameTableCharCount="2000000000" /> 
     <security mode="None" /> 
    </binding> 
    </netTcpBinding> 
</bindings> 

+0

我默认的Web.config由Visual Studio 2012创建不包含任何绑定或服务。我能够添加它们,但它们对服务运行方式没有影响。它仍然在90秒内超时。 (我甚至无法将时间缩短到小于配置的时间)。 – 2013-05-15 12:51:59

+0

确保您将这些设置添加到您的客户端配置!这些设置应该用于服务和客户端。 – Jeff 2013-05-15 21:03:55