Export (0) Print
Expand All

WebException.Status Property

Gets the status of the response.

Namespace:  System.Net
Assemblies:   System.Net.Requests (in System.Net.Requests.dll)
  System (in System.dll)

member Status : WebExceptionStatus with get

Property Value

Type: System.Net.WebExceptionStatus
One of the WebExceptionStatus values.

The Status property indicates the reason for the WebException.

The value of Status is one of the WebExceptionStatus values.

Caution noteCaution

The ProxyNameResolutionFailure error is not returned to Windows Store apps.

The following example checks the Status property and prints to the console the StatusCode and StatusDescription of the underlying HttpWebResponse instance.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft