WebRequest.Abort Method


Aborts the request.

 abstract void Abort();
 virtual void Abort();
public abstract void Abort ();
public virtual void Abort ();
abstract member Abort : unit -> unit
abstract member Abort : unit -> unit
override this.Abort : unit -> unit
Public MustOverride Sub Abort ()
Public Overridable Sub Abort ()


Any attempt is made to access the method, when the method is not overridden in a descendant class.


The Abort method cancels asynchronous requests to Internet resources started with the BeginGetResponse method.


The WebRequest class is an abstract class. The actual behavior of WebRequest instances at run time is determined by the descendant class returned by the WebRequest.Create method. For more information about default values and exceptions, see the documentation for the descendant classes, such as HttpWebRequest and FileWebRequest.

Applies to