0

いくつかのパラメータのみを渡す RIA Services 呼び出しがありますが、処理に時間がかかる場合があります (例: 20 分以上)。10 ~ 15 分程度になると、Error 404 Not Found 例外が発生します。 . タイムアウトの問題に対処するためにこれまでに行ったことは次のとおりです。

<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>

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;
    }
}

どちらも問題に影響を与えていないようです。どんなアイデアでも大歓迎です!

4

0 に答える 0