【问题标题】:The open operation did not complete within the allotted timeout of 00:01:00 - AX 2012 using AIF/WCF打开操作未在分配的 00:01:00 超时内完成 - AX 2012 使用 AIF/WCF
【发布时间】:2012-07-30 10:43:03
【问题描述】:

AX 2012 中的AIF 在处理需要很长时间的大量数据时遇到问题。我正在使用适配器 NetTCP,并且在使用 WebForm 应用程序使用 Web 服务时遇到以下异常。

The open operation did not complete within the allotted timeout of 00:01:00. 
The time allotted to this operation may have been a portion of a longer timeout.

InnerException:The socket transfer timed out after 00:00:59.9990234. You have exceeded the timeout set on your binding.
 The time allotted to this operation may have been a portion of a longer timeout.

InnerException:A connection attempt failed because the connected party did not properly respond after a period of time, 
or established connection failed because connected host has failed to respond

应用程序代码基本上是(我什至在每个循环中打开和关闭连接),如主题Error message: The open operation did not complete within the allotted timeout

public void CreateFromCSVFile(Stream fileStream)
        {
            ExportingData_Test.VendVendServices.VendTableServiceClient VenSvcClient = new VendTableServiceClient();

            try
            {
                List<string[]> VendData = Helper.ImportCSVFile.ParseCSVFile(fileStream, true);

                foreach (string[] vendor in VendData)
                {
                      VenSvcClient = new VendTableServiceClient();

                       VenSvcClient.Endpoint.Binding.OpenTimeout = new TimeSpan(0, 1, 10, 0);
                       VenSvcClient.Endpoint.Binding.ReceiveTimeout = new TimeSpan(0, 1, 10, 0);
                       VenSvcClient.Endpoint.Binding.SendTimeout = new TimeSpan(0, 1, 10, 0);
                       VenSvcClient.Endpoint.Binding.CloseTimeout = new TimeSpan(0, 1, 10, 0);

                        VenSvcClient.Open();

                        //DO SOME OPERATION IN HERE
                        //Create the Vendor

                        entityKey = VenSvcClient.create(callContext, axdVendor);
                        VenSvcClient.Close();
                 }
            }
            catch (Exception ex)
            {
                String message = ex.Message;
            }
           finally
           {
               VenSvcClient.Close();
           }
        }

我尝试使用Microsoft Service Configuration Editor配置增强端口,用于配置下面的WCF,增加了大部分属性:

主机

  1. 关闭超时到 00:10:00
  2. OpenTimeout 到 00:10:00

绑定中:

  1. MaxReceivedMessageSize 为 1004857600。如 here 建议。
  2. MaxBufferSize 为 1004857600。
  3. MaxBufferPoolSize 为 1004857600。
  4. ReceivedTimeout 01:10:00
  5. 发送超时 01:10:00
  6. MaxBytesPerRead 1004857600
  7. InactivityTimeout 01:10:00
  8. ReliableSessionProperty 错误

但我仍然遇到同样的错误。

【问题讨论】:

    标签: wcf axapta ax dynamics-ax-2012 aif


    【解决方案1】:

    提到了同样的错误here

    但建议是使用 Microsoft WCF 服务配置编辑器编辑参数 ReceiveTimeout 和 SendTimeout,您可能已经这样做了。也许仔细检查您是否点击了正确的端口。

    【讨论】:

    • 问题是我在调用其他使用不同网络服务的方法,而我并没有配置这些网络服务,而是主要的。
    猜你喜欢
    • 2016-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-17
    相关资源
    最近更新 更多