EndGetRequestStream Method
Collapse the table of content
Expand the table of content

FtpWebRequest.EndGetRequestStream Method (IAsyncResult)

 

Ends a pending asynchronous operation started with BeginGetRequestStream.

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

Public Overrides Function EndGetRequestStream (
	asyncResult As IAsyncResult
) As Stream

Parameters

asyncResult
Type: System.IAsyncResult

The IAsyncResult object that was returned when the operation started.

Return Value

Type: System.IO.Stream

A writable Stream instance associated with this instance.

Exception Condition
ArgumentNullException

asyncResult is null.

ArgumentException

asyncResult was not obtained by calling BeginGetRequestStream.

InvalidOperationException

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

If the operation has not completed, the EndGetRequestStream method blocks until the operation completes. To determine whether the operation has completed, check the IsCompleted property before calling EndGetRequestStream.

In addition to the exceptions noted in "Exceptions," EndGetRequestStream rethrows exceptions that were thrown while opening the stream for writing.

System_CAPS_noteNote

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

The following code example demonstrates ending an asynchronous operation to get a request's stream. 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.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft