TimeOut problem with WCF

0

I would like you to help me, I'm doing a service SOAP in WCF for which the problem falls by timeout of the service because I have a foreach of 14 thousand records and each one does something. But if it happens the 5 min it leaves an error message that indicates timeout 00:05:00

What I have done in the web.config already add the waiting time but in the same way if it passes in 5 min that message of TimeOut

<binding name="ServicioGenerarFlujoSPBinding" maxBufferPoolSize="80000000" maxBufferSize="80000000" maxReceivedMessageSize="80000000" closeTimeout="20:00:00" openTimeout="20:00:00" receiveTimeout="20:00:00" sendTimeout="20:00:00">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />

<service name="CalculosBeneficios.Aplicacion.WCF.Servicio.SP.ServicioFlujoSP">
        <endpoint address="net.tcp://localhost:20007/ServicioEPV.FlujosSP.CalculosBeneficios" 
                  binding="netTcpBinding" bindingConfiguration="ServicioGenerarFlujoSPBinding" 
          contract="CalculosBeneficios.Aplicacion.Contrato.Servicio.SP.IServicioGenerarFlujosSP">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:20007/ServicioEPV.FlujosSP.CalculosBeneficios" />
          </baseAddresses>
        </host>
      </service>


<bindings>
      <netTcpBinding>
        <binding name="ServicioGenerarFlujoSPBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" closeTimeout="20:00:00" openTimeout="20:00:00" receiveTimeout="20:00:00" sendTimeout="20:00:00">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </netTcpBinding>
    </bindings>
    
asked by PieroDev 21.12.2018 в 20:52
source

1 answer

0

In addition to defining the timeout in the client's config you should also do it on the server

<bindings>
   <basicHttpBinding>
        <binding name="BasicHttpsBindingConfig" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"
         receiveTimeout="00:10:00" sendTimeout="00:10:00">
    <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647"/>
        </binding>
   </basicHttpBinding>
</bindings>

validate how the sendTimeout

is defined in the server's config

Also pay attention that this binding is what you use to expose the service

How to: Increase the timeout value of a WCF service

Increasing the timeout value in a WCF service

    
answered by 21.12.2018 / 21:01
source