December 03, 2013
Gets the response that the remote host returned.
Assembly: System.Net (in System.Net.dll)
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.BeginGetResponse initiates a request for a response and WebRequest.EndGetResponse sets the Status property and provides the WebResponse that contains the error message in the property of the WebException that was thrown. The application can examine the WebResponse to determine the actual error.
When Status is UnknownError, additional details about the protocol specific response error may be available using the property. If the property is not null, this indicates that the remote server responded with an error code. In this case, the property can be queried for more specific information about the response.