FileWebRequest.EndGetRequestStream Method (IAsyncResult)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Ends an asynchronous request for a Stream instance that the application uses to write data.

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

override EndGetRequestStream : 
        asyncResult:IAsyncResult -> Stream

Parameters

asyncResult
Type: System.IAsyncResult

An IAsyncResult that references the pending request for a stream.

Return Value

Type: System.IO.Stream

A Stream object that the application uses to write data.

Exception Condition
ArgumentNullException

asyncResult is null.

The EndGetRequestStream method completes an asynchronous stream request that was started by the BeginGetRequestStream method.

System_CAPS_noteNote

To avoid timing issues with garbage collection, be sure to close the response stream by calling the Close method on the stream returned by the GetResponseStream method after calling the EndGetResponse method.

The following example uses the EndGetRequestStream method to end the asynchronous request for a Stream object.

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

.NET Framework
Available since 1.1
Return to top
Show: