Export (0) Print
Expand All
0 out of 3 rated this helpful - Rate this topic

FtpWebRequest.EndGetResponse Method

Ends a pending asynchronous operation started with BeginGetResponse.

Namespace: System.Net
Assembly: System (in system.dll)

'Declaration
Public Overrides Function EndGetResponse ( _
	asyncResult As IAsyncResult _
) As WebResponse
'Usage
Dim instance As FtpWebRequest
Dim asyncResult As IAsyncResult
Dim returnValue As WebResponse

returnValue = instance.EndGetResponse(asyncResult)
public WebResponse EndGetResponse (
	IAsyncResult asyncResult
)
public override function EndGetResponse (
	asyncResult : IAsyncResult
) : WebResponse
Not applicable.

Parameters

asyncResult

The IAsyncResult that was returned when the operation started.

Return Value

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

ArgumentNullException

asyncResult is a null reference (Nothing in Visual Basic).

ArgumentException

asyncResult was not obtained by calling BeginGetResponse.

InvalidOperationException

This method was already called for the operation identified by asyncResult.

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

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

NoteNote:

This member outputs trace information when you enable network tracing in your application. For more information, see Network Tracing.

Notes to Callers: This method generates network traffic.

The following code example demonstrates ending an asynchronous operation to get a response. This code example is part of a larger example provided for the FtpWebRequest class overview.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.