【问题标题】:Chart doesn't display long-running WCF service? Timeout issue?图表不显示长期运行的 WCF 服务?超时问题?
【发布时间】:2018-12-07 21:26:40
【问题描述】:

我们有一个为 amcharts 图表生成json 的 WCF 方法。然后图表会显示数据。

如果调用时间很短(即 12/1-12/5),那么 json 会快速生成,并且 amcharts 图表会显示数据。

另一方面,如果全年都进行调用,则生成结果需要更长的时间。直接调用 WCF 将在大约 6-8 秒内生成 json。如果图表调用它,它永远不会加载。

我已经确认问题不在于 WCF 方法,因为最终会返回 json。我知道SP可以优化,但这是另一个问题。

我们在Windows Server 2008 上使用IIS 6。此特定 WCF 的应用程序池设置为 .Net Framework 4.0Integrated

在项目方面,我们使用VS2013C#

你有什么推荐的?

我尝试增加web.config 中的超时设置,但没有太大帮助。

【问题讨论】:

    标签: c# wcf visual-studio-2013 iis-6 windows-server-2008


    【解决方案1】:

    请尝试配置所有相关属性。

    <bindings>
      <basicHttpBinding>
        <binding name="myBindingConfig"  maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
          maxReceivedMessageSize="2147483647" bypassProxyOnLocal="true"   openTimeout="00:10:00" 
             closeTimeout="00:10:00"  sendTimeout="00:15:00" receiveTimeout="00:10:00" >
          <readerQuotas maxArrayLength="2147483647" maxNameTableCharCount="2147483647"
              maxStringContentLength="2147483647" maxDepth="2147483647" 
              maxBytesPerRead="2147483647" />
          <security mode="None" />
        </binding>
      </basicHttpBinding>
    </bindings>
    

    和servicebehavior,开启service debug可以看到客户端的错误

          <serviceBehaviors>
         <behavior name="myServiceBehavior">
      <dataContractSerializer  maxItemsInObjectGraph="2147483647" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    
          </behavior>
    
       </serviceBehaviors>
    

    【讨论】:

      猜你喜欢
      • 2011-06-04
      • 1970-01-01
      • 1970-01-01
      • 2013-07-31
      • 2012-11-10
      • 1970-01-01
      • 2014-07-26
      • 1970-01-01
      • 2010-12-11
      相关资源
      最近更新 更多