简体   繁体   English

Web服务方法调用超时,元数据请求正常运行

[英]Web service method call times out, metadata request works fine

I have a WCF service which is not responding to method calls. 我有一个WCF服务 ,它不响应方法调用。 On the client side, I get timeouts when I call any method. 在客户端,调用任何方法都会超时。

Interestingly, when I update the reference on Visual Studio it works fine. 有趣的是,当我在Visual Studio上更新引用时,它可以正常工作。 It responds to metadata requests as expected. 它按预期响应元数据请求。

Looking at the Windows Event Log (on the server), I see the message App Pool exceeded time limits during shut down . 查看Windows 事件日志 (在服务器上),我看到消息“ App Pool exceeded time limits during shut down

And looking at IIS log , I see the message Connection_Abandoned_By_AppPool FooBar , where FooBar is the name of the application pool. 并查看IIS日志 ,我看到消息Connection_Abandoned_By_AppPool FooBar ,其中FooBar是应用程序池的名称。

Can anyone tell me why my WCF service is not responding to client requests? 谁能告诉我为什么我的WCF服务没有响应客户端请求?


Here is the web.config on the server: 这是服务器上的web.config

<?xml version="1.0"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>

  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="FooBarBehaviors">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <bindings>
      <basicHttpBinding>
        <binding name="FooBarBinding">
          <readerQuotas maxArrayLength="1048576" />
        </binding>
      </basicHttpBinding>
    </bindings>

    <services>
      <service name="FooBarSvc.FooBar" behaviorConfiguration="FooBarBehaviors">
        <endpoint contract="FooBarSvc.FooBar" binding="basicHttpBinding" bindingConfiguration="FooBarBinding" address="" />
      </service>
    </services>
  </system.serviceModel>

</configuration>

I figured out that it was a problem with a component I'm using. 我发现这与我正在使用的组件有关。 The web service is fine, but the component hangs, making the method call to take forever to return, therefore, being abandoned and causing timeouts on client side. Web服务很好,但是组件挂起,使得方法调用要花很长时间才能返回,因此被放弃并导致客户端超时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM