This documentation is archived and is not being maintained.

FtpWebRequest.EndGetRequestStream Method

Ends a pending asynchronous operation started with BeginGetRequestStream.

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

abstract EndGetRequestStream : 
        asyncResult:IAsyncResult -> Stream 
override EndGetRequestStream : 
        asyncResult:IAsyncResult -> 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.

ExceptionCondition
ArgumentNullException

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

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.

NoteNote

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

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

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: