1

私はWCFを初めて使用しますが、データアクセス層としてWCFサービスを使用するWebアプリケーションがあります。私はwcfサービスライブラリを使用していて、IIS7でそれをホストしています。いくつかの最初のサービス呼び出しでは正常に機能しますが、さらに要求するためにアプリケーションをハングさせます。IISをリセットすると、しばらくの間は正常に機能しています。以下は、Webアプリの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呼び出しにコメントすると、ダミー値のアプリケーションは正常に機能しますか?適切な解決策を提案してください

4

1 に答える 1

1

おそらく、リクエストの最後に WCF クライアント インスタンスを破棄していません。WCF クライアントを操作する際の落とし穴については、この投稿を参照してください。

于 2012-11-15T13:32:44.343 に答える