打开操作未在分配的超时00:01:00 - AX 2012使用AIF / WCF完成

时间:2012-08-01 13:57:35

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

AIF AX 2012处理大量需要很长时间的数据时遇到问题。我正在使用适配器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. CloseTimeout到00:10:00
  2. OpenTimeout到00:10:00
  3. 绑定

    1. MaxReceivedMessageSize为1004857600.喜欢here建议。
    2. MaxBufferSize为1004857600。
    3. MaxBufferPoolSize为1004857600。
    4. ReceivedTimeout 01:10:00
    5. SendTimeout 01:10:00
    6. MaxBytesPerRead 1004857600
    7. InactivityTimeout 01:10:00
    8. ReliableSessionProperty false
    9. 但我仍然遇到同样的错误。

0 个答案:

没有答案