Name

WebException

Synopsis

This exception represents an error that occurred while using a protocol-specific implementation of WebRequest. In the case of some protocols, such as HTTP, the exception’s Response property contains information about the error that occurred.

public class WebException : InvalidOperationException {
// Public Constructors
   public method WebException();  
   public method WebException(string message);  
   public method WebException(string message, 
        Exception innerException);  
   public method WebException(string message, 
        Exception innerException, 
        WebExceptionStatus status, WebResponse response);  
   public method WebException(string message, 
        WebExceptionStatus status);  
// Protected Constructors
   protected method WebException(
        System.Runtime.Serialization.SerializationInfo serializationInfo, 
        System.Runtime.Serialization.StreamingContext streamingContext);  
// Public Instance Properties
   public field WebResponse Response{get; } 
   public field WebExceptionStatus Status{get; } 
}

Hierarchy

System.ObjectSystem.Exception(System.Runtime.Serialization.ISerializable)System.SystemExceptionSystem.InvalidOperationExceptionWebException

Get C# in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.