0

We have a RIA Services call that only passes a couple of parameters, however it can take an extended period of time to process (e.g. 20+ minutes) When it hits around the 10 to 15 minute mark, we get an Error 404 Not Found exception. Here are the things we've done so far to take care of any timeout issues: WebConfig - ServerSide

<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
<bindings>
  <basicHttpBinding>
    <binding name="" closeTimeout="01:00:00" openTimeout="01:00:00"
    receiveTimeout="01:00:00" sendTimeout="01:00:00" maxBufferSize="2147483647"
    maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
      maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="Transport"/>
    </binding>
  </basicHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    </behavior>
  </serviceBehaviors>
</behaviors>

Changed the WcfTimeouts:

public static class DomainContextExtensions
{
    public static void ChangeWcfTimeouts(this DomainContext context)
    {
        PropertyInfo channelFactoryProperty =
          context.DomainClient.GetType().GetProperty("ChannelFactory");
        if (channelFactoryProperty == null)
        {
            throw new InvalidOperationException(
              "There is no 'ChannelFactory' property on the DomainClient.");
        }
        TimeSpan timeout = new TimeSpan(1, 0, 0); // 1 Hour

        ChannelFactory factory = (ChannelFactory)channelFactoryProperty.GetValue(context.DomainClient, null);
        factory.Endpoint.Binding.SendTimeout = timeout;
        factory.Endpoint.Binding.CloseTimeout = timeout;
        factory.Endpoint.Binding.OpenTimeout = timeout;
        factory.Endpoint.Binding.ReceiveTimeout = timeout;
    }
}

Neither seems to affect the issue. Any and all ideas are welcome!

4

0 回答 0