WebClient..::.OpenReadAsync Method (Uri)
This page is specific to:Microsoft Version:
2.03.03.5Silverlight 34
.NET Framework Class Library for Silverlight
WebClient..::.OpenReadAsync Method (Uri)

Opens a readable stream to the specified resource.

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

'Usage

Dim instance As WebClient
Dim address As Uri

instance.OpenReadAsync(address)

'Declaration

Public Sub OpenReadAsync ( _
    address As Uri _
)

Parameters

address
Type: System..::.Uri
The location of the resource to be downloaded.
Exceptions

ExceptionCondition
ArgumentNullException

The address parameter is nullNothingnullptra null reference (Nothing in Visual Basic).

OutOfMemoryException

There is not enough memory to continue the execution of the program.

StackOverflowException

The execution stack overflowed because it contains too many nested method calls.

ThreadAbortException

A call was made to the Thread..::.Abort method to destroy a thread.

Remarks

This method retrieves the specified resource using the GET method. The resource is downloaded asynchronously. If the AllowReadStreamBuffering property is true, then the OpenReadCompleted event is raised once the entire response stream has been received and buffered into memory. Otherwise, the OpenReadCompleted event is raised as soon as the response stream is available for reading even if all data has not yet arrived.

You can use the CancelAsync method to cancel asynchronous operations that have not completed.

You cannot call the OpenReadAsync method again on the same WebClient object, until the first download operation is completed. Doing this causes an exception.

If the BaseAddress property is not an empty string and the address does not contain an absolute URI, the address must be a relative URI that is combined with BaseAddress to form the absolute URI of the requested data.

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

© 2010 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View