WebResponse.GetResponseStream Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

When overridden in a descendant class, returns the data stream from the Internet resource.

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

Syntax

'Declaration
Public MustOverride Function GetResponseStream As Stream
public abstract Stream GetResponseStream()

Return Value

Type: System.IO.Stream
An instance of the Stream class for reading data from the Internet resource.

Exceptions

Exception Condition
NotSupportedException

Any attempt is made to access the method, when the method is not overridden in a descendant class.

Remarks

The GetResponseStream method returns the data stream from the Internet resource.

NoteNote:

The response stream must be closed to avoid running out of system resources. The response stream can be closed by calling Stream.Close or Close

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

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