【问题标题】:Slowing web application with WCF on timely request应及时请求使用 WCF 减慢 Web 应用程序
【发布时间】:2012-11-15 11:17:36
【问题描述】:

我是 WCF 的新手,我有一个使用 WCF 服务作为数据访问层的 Web 应用程序。我正在使用 wcf 服务库并在 IIS7 上托管它。它适用于少数初始服务调用,但会挂起应用程序以供进一步请求。当我重置 IIS 时,它又可以正常工作一段时间了。 下面是web app的web.config中的服务配置

 <system.serviceModel>
<bindings>
  <wsHttpBinding>
    <binding name="WSHttpBinding_IRoaster" closeTimeout="00:10:00"
      openTimeout="00:01:00" receiveTimeout="00:02:00" sendTimeout="00:03:00"
      bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
      maxBufferPoolSize="524288" maxReceivedMessageSize="199999488" messageEncoding="Text"
      textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
               <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
               <reliableSession ordered="true" inactivityTimeout="00:10:00"
        enabled="false" />
               <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None"
          realm="" />
                    <message clientCredentialType="Windows" negotiateServiceCredential="true"
          algorithmSuite="Default" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<client>
  <endpoint address="http://asdf.com/RoasterService/RoasterService.Roaster.svc"
    binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IRoaster"
    contract="RoasterService.IRoaster" name="WSHttpBinding_IRoaster">
    <identity>
      <dns value="localhost" />
    </identity>
  </endpoint>
</client>

如果我评论所有 wcf 调用,那么对于虚拟值应用程序是否可以正常工作。请提出适当的解决方案

【问题讨论】:

    标签: asp.net wcf wcf-data-services


    【解决方案1】:

    您可能没有在请求结束时释放 WCF 客户端实例。看this post for the gotcha's in working with WCF clients.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-24
      相关资源
      最近更新 更多