HttpRequest.Abort HttpRequest.Abort HttpRequest.Abort HttpRequest.Abort Method

定義

強制終止造成任何待處理 I/O 失敗的基礎 TCP 連線。Forcibly terminates the underlying TCP connection, causing any outstanding I/O to fail. 您可以使用此方法,以回應惡意 HTTP 用戶端攻擊。You might use this method in response to an attack by a malicious HTTP client.

public:
 void Abort();
public void Abort ();
member this.Abort : unit -> unit
Public Sub Abort ()

備註

這個方法是安全執行緒。This method is thread-safe. 任何執行緒可以隨時呼叫它。Any thread may call it at any time.

這個方法僅能在整合模式下使用。This method can only be used in integrated mode. 如果您叫用它在傳統模式中,會擲回例外狀況。If you invoke it in classic mode, an exception is thrown. 若要判斷管線模式,請使用UsingIntegratedPipelineTo determine the pipeline mode, use UsingIntegratedPipeline.

適用於