Gets the response that the remote host returned.
Assemblies: System.Net.Requests (in System.Net.Requests.dll)
System (in System.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.GetResponse sets the Status property to WebExceptionStatus.ProtocolError 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.