System.Net.FtpWebRequest.EndGetResponse Method

Ends a pending asynchronous operation started with FtpWebRequest.BeginGetResponse(AsyncCallback, object).

Syntax

public override WebResponse EndGetResponse (IAsyncResult asyncResult)

Parameters

asyncResult
The IAsyncResult that was returned when the operation started.

Returns

A System.Net.WebResponse reference that contains an System.Net.FtpWebResponse instance. This object contains the FTP server's response to the request.

Remarks

If the operation has not completed at the time the FtpWebRequest.EndGetResponse(IAsyncResult) method is called, FtpWebRequest.EndGetResponse(IAsyncResult) blocks until the operation completes. To prevent blocking, check the IAsyncResult.IsCompleted property before calling FtpWebRequest.EndGetResponse(IAsyncResult).

In addition to the exceptions noted in "Exceptions," FtpWebRequest.EndGetResponse(IAsyncResult) rethrows exceptions that were thrown while communicating with the server.

Note:

This member outputs trace information when you enable network tracing in your application. For more information, see [<topic://conUsingNetworkTracing>].

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0