Mono Class Library: System.Net.WebException Overview | Members

System.Net.WebException.Response Property

Gets the System.Net.WebResponse that the host returned. [Edit]

public WebResponse Response { get; }

Value

A System.Net.WebResponse instance containing the error response if one is available; otherwise, null . [Edit]

Remarks

This property is read-only.

Note: Some Internet protocols, such as HTTP, return otherwise valid responses indicating that an error has occurred at the protocol level. When the response to an Internet request indicates an error, WebRequest.GetResponse sets the WebException.Status property to WebExceptionStatus.ProtocolError and provides the System.Net.WebResponse containing the error message in the WebException.Response property of the System.Net.WebException that was thrown. The System.Net.WebResponse can be examined to determine the actual error.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0