WebClient.OpenReadAsync Method (Uri, Object)
Assembly: System (in system.dll)
The URI of the resource to retrieve.
A user-defined object that is passed to the method invoked when the asynchronous operation completes.
This method retrieves a Stream instance used to access the resource specified by the address parameter. The stream is obtained using thread resources that are automatically allocated from the thread pool. To receive notification when the stream is available, add an event handler to the OpenReadCompleted event.
You must call Stream.Close when you are finished with the Stream to avoid running out of system resources.
This method does not block the calling thread while the stream is opening. To block while waiting for the stream, use the OpenRead method.
Asynchronous operations that have not completed can be canceled using the CancelAsync method.
If the BaseAddress property is not an empty string ("") and address does not specify an absolute URI, address must be a relative URI that is combined with BaseAddress to form the absolute URI of the requested resource. If the QueryString property is not a null reference (Nothing in Visual Basic), it is appended to address.
This method uses the RETR command to download an FTP resource. For an HTTP resource, the GET method is used.
This member outputs trace information when you enable network tracing in your application. For more information, see Network Tracing.
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 EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.