WCF timeout exception detailed investigation

后端 未结 11 1240
失恋的感觉
失恋的感觉 2020-11-29 16:44

We have an application that has a WCF service (*.svc) running on IIS7 and various clients querying the service. The server is running Win 2008 Server. The clients are runnin

相关标签:
11条回答
  • 2020-11-29 17:19

    If you are using .Net client then you may not have set

    //This says how many outgoing connection you can make to a single endpoint. Default Value is 2
    System.Net.ServicePointManager.DefaultConnectionLimit = 200;
    

    here is the original question and answer WCF Service Throttling

    Update:

    This config goes in .Net client application may be on start up or whenever but before starting your tests.

    Moreover you can have it in app.config file as well like following

    <system.net>
        <connectionManagement>
          <add maxconnection = "200" address ="*" />
        </connectionManagement>
      </system.net>
    
    0 讨论(0)
  • 2020-11-29 17:19

    I've just solved the problem.I found that the nodes in the App.config file have configed wrong.

    <client>
    <endpoint name="WCF_QtrwiseSalesService" binding="wsHttpBinding" bindingConfiguration="ws" address="http://cntgbs1131:9005/MyService/TGE.ISupplierClientManager" contract="*">
    </endpoint>
    </client>
    
    <bindings>
        <wsHttpBinding>
            <binding name="ws" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
                <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
                <**security mode="None">**
                    <transport clientCredentialType="None"></transport>
                </security>
            </binding>
        </wsHttpBinding>
    </bindings>
    

    Confirm your config in the node <security>,the attribute "mode" value is "None". If your value is "Transport",the error occurs.

    0 讨论(0)
  • 2020-11-29 17:19

    Looks like this exception message is quite generic and can be received due to a variety of reasons. We ran into this while deploying the client on Windows 8.1 machines. Our WCF client runs inside of a windows service and continuously polls the WCF service. The windows service runs under a non-admin user. The issue was fixed by setting the clientCredentialType to "Windows" in the WCF configuration to allow the authentication to pass-through, as in the following:

          <security mode="None">
            <transport clientCredentialType="Windows" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
    
    0 讨论(0)
  • 2020-11-29 17:20

    Are you closing the connection to the WCF service in between requests? If you don't, you'll see this exact timeout (eventually).

    0 讨论(0)
  • 2020-11-29 17:20

    Did you try using clientVia to see the message sent, using SOAP toolkit or something like that? This could help to see if the error is coming from the client itself or from somewhere else.

    0 讨论(0)
提交回复
热议问题