O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required