Mono Class Library: System.Net.HttpWebRequest Overview | Members

System.Net.HttpWebRequest.Abort Method

Cancels an asynchronous operation.

public override void Abort ()

Remarks

HttpWebRequest.Abort cancels any pending asynchronous operation. After this method is called, calling HttpWebRequest.GetResponse, HttpWebRequest.BeginGetResponse(AsyncCallback, object), HttpWebRequest.EndGetResponse(IAsyncResult), HttpWebRequest.GetRequestStream, HttpWebRequest.BeginGetRequestStream(AsyncCallback, object), or HttpWebRequest.EndGetRequestStream(IAsyncResult) will throw a System.Net.WebException with WebException.Status set to WebExceptionStatus.RequestCanceled .

Note:

If no pending request exists, calling this method does not cause an exception to be thrown.

This method overrides WebRequest.Abort.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0