0

I have two applications working together. The first is the client that communicates with the second, the service. Both are written in C#/.NET.

The client has a web page which submits a form based on previously submitted data (also within the client).

The submission in question is handled by the service.

For the most part, the submissions are fine but in somewhat rare scenarios there can be many (200+) elements to handle on the submission. This is where the timeout issue comes in.

Setting up a try/catch block where the submission is handled results in the following:

catching error: System.ServiceModel.FaultException 1[System.ServiceModel.ExceptionDetail]: The HTTP request to 'WSDL SERVICE HERE' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:

So I've toyed with the Web.config files in both the client and the service, setting binding tags with the following:

openTimeout="00:10:00" closeTimeout="00:10:00" sendTimeout="00:10:00" receiveTimeout="00:10:00"

What's odd is that if I set it to anything greater than 1 minute (notably in the client), the custom values are not recognized. If I set the values to less than 1 minute, the custom values are recognized.

I've also played around with maxReceivedMessageSize, maxBufferSize and maxBufferPoolSize but to no avail.

I really do not think it is something related to the logic in either application as if the element count is ~<100 there is not an issue. But we do have to be able to handle element counts of 200+.

Setting breakpoints in both applications has helped a bit but really hasn't gotten me anywhere.

Any insight on this is appreciated.

Nubtacular
  • 1,367
  • 2
  • 18
  • 38

1 Answers1

0

Use the below settings for both server and client. In our service we use this to traffic huge volume of data seems to work for us.

<system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <bindings>
      <basicHttpBinding>
        <binding name="basicHttp" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Mtom" transferMode="Streamed">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="MyService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttp" name="MyService" bindingNamespace="CustomNameSpace" contract="IService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  • Will give this a try and report back. Cheers – Nubtacular Sep 28 '18 at 20:26
  • No luck with that config setup. Still getting the usual error message of `The HTTP request to 'service_here/?wsdl' has exceeded the allotted timeout of 00:01:00` – Nubtacular Oct 02 '18 at 18:25
  • Did you tried with both client and server. And if your client is some c# code then also your code has to set the timeout as well. – Jayanta Patra Oct 04 '18 at 09:55
  • Correct, set same configs in both client and server. Just to be clear the configs for timeout HAVE to be the same in client and server, correct? – Nubtacular Oct 04 '18 at 15:42