1

WCF サービスに問題があります。プログラムが3時間完全に実行された後、次の例外が発生します。

System.TimeoutException: The request channel timed out while waiting for a reply after 00:00:59.9843998. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout

タイムアウトを増やすことが解決策になるとは思いません。ほんの数分後に例外がスローされると思います。リスナーサーバーの設定を変更する必要があるかもしれません。私のマシンが一定時間後にポートを閉じている可能性はありますか? 私は自分のサービスを次のように呼び出します:

IServices service = null;
                    service = ChannelFactory<IServices>.CreateChannel(
                        new BasicHttpBinding(),
                        new EndpointAddress(
                        port));
                    result = service.addAppointments(appList);

私の聞き手:

ServiceHost host = new ServiceHost(service);
                    host.AddServiceEndpoint(typeof(
                            IServices),
                            new BasicHttpBinding(), port);
                    host.Open();

それで全部です。これまでのところ、これ以上の設定は必要ありませんでした。

4

1 に答える 1

0

構成を通じて、WCFのトレーサーを追加できます。これは、問題がどこにあるかを見つけるのに役立ちます。

http://msdn.microsoft.com/en-us/library/ms733025.aspx

http://msdn.microsoft.com/en-us/library/ms732023.aspx

于 2012-07-26T12:13:29.170 に答える