The exception that is thrown when an error occurs while accessing the network through a pluggable protocol.
<SerializableAttribute> _ Public Class WebException _ Inherits InvalidOperationException _ Implements ISerializable
[SerializableAttribute] public class WebException : InvalidOperationException, ISerializable
[SerializableAttribute] public ref class WebException : public InvalidOperationException, ISerializable
[<SerializableAttribute>] type WebException = class inherit InvalidOperationException interface ISerializable end
The WebException type exposes the following members.
The WebException class is thrown by classes descended from WebRequest and WebResponse that implement pluggable protocols for accessing the Internet.
When WebException is thrown by a descendant of the WebRequest class, the Response property provides the Internet response to the application.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2