1

長時間かかる大量のデータを扱う場合に問題が発生し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

アプリケーションコードは、トピック「エラーメッセージ:割り当てられたタイムアウト内にオープン操作が完了しませんでした」のように、基本的に(各ループで接続を開いたり閉じたりしています)です。

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に

バインディング:_

  1. MaxReceivedMessageSizeを1004857600に設定します。ここでのようにアドバイスします。
  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

しかし、それでも同じエラーが発生します。

4

1 に答える 1

0

同じエラーがここに記載されています。

ただし、Microsoft WCFサービス構成エディターを使用してパラメーターReceiveTimeoutおよびSendTimeoutを編集することをお勧めします。これは、実行した可能性があります。たぶん、正しいポートにヒットしたことを再確認してください。

于 2012-08-17T12:08:01.817 に答える