3

コンソール アプリに SOAP Web サービスを追加しましたが、特定の呼び出しを行うたびにタイムアウトになります。他の通話は正常に機能します。コンソール アプリでタイムアウトの長さを増やすにはどうすればよいですか? 現在、約90秒のようです。

ありがとう。

4

2 に答える 2

0

これにより、タイムアウトを変更し、変更されたことを確認できます。

public int タイムアウト { get; 設定; }

[Transaction(Timeout=30)] public class TransactionAttribute_Timeout : ServicedComponent { public void TimeoutExample() { // クラスに適用される TransactionAttribute を取得します。TransactionAttribute 属性 = (TransactionAttribute)Attribute.GetCustomAttribute( this.GetType(), typeof(TransactionAttribute), false);

    // Display the current value of the attribute's Timeout property.
    Console.WriteLine("TransactionAttribute.Timeout: {0}",
        attribute.Timeout);

    // Set the Timeout property value of the attribute to sixty
    // seconds.
    attribute.Timeout = 60;

    // Display the new value of the attribute's Timeout property.
    Console.WriteLine("TransactionAttribute.Timeout: {0}",
        attribute.Timeout);
}

}

于 2009-03-17T12:31:53.253 に答える