FileWebRequest.Abort 方法

定义

取消向 Internet 资源发出的请求。Cancels a request to an Internet resource.

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

注解

Abort 方法取消对资源的请求。The Abort method cancels a request to a resource. 取消请求后,调用 GetResponseBeginGetResponseEndGetResponseGetRequestStreamBeginGetRequestStreamEndGetRequestStream 方法将导致 WebException 属性设置为 StatusRequestCanceledAfter a request is canceled, calling the GetResponse, BeginGetResponse, EndGetResponse, GetRequestStream, BeginGetRequestStream, or EndGetRequestStream method causes a WebException with the Status property set to RequestCanceled.

注意当你在应用程序中启用网络跟踪时,此成员将输出跟踪信息。Note This member outputs trace information when you enable network tracing in your application. 有关详细信息,请参阅.NET Framework 中的网络跟踪For more information, see Network Tracing in the .NET Framework.

适用于