www.gibmonks.com

Main Page

  Previous Section Next Section

HttpException

System.Web (system.web.dll)class

This class encapsulates an ASP.NET exception. It is a standard exception object, with the addition of the GetHtmlErrorMessage( ) method and the GetHttpCode( ) method, that returns the HTTP error code representing the error (like 404 for file not found) as an integer. If no HTTP error code exists for the current exception or the InnerException, the status code 500 is returned.

public class HttpException : System.Runtime.InteropServices.ExternalException {
// Public Constructors
   public HttpException( );
   public HttpException(int httpCode, string message);
   public HttpException(int httpCode, string message, Exception innerException);
   public HttpException(int httpCode, string message, int hr);
   public HttpException(string message);
   public HttpException(string message, Exception innerException);
   public HttpException(string message, int hr);
// Public Static Methods
   public static HttpException CreateFromLastError(string message);
// Public Instance Methods
   public string GetHtmlErrorMessage( );
   public int GetHttpCode( );
}

Hierarchy

System.Object System.Exception(System.Runtime.Serialization.ISerializable) System.SystemException System.Runtime.InteropServices.ExternalException HttpException

Subclasses

HttpCompileException, HttpParseException, HttpRequestValidationException, HttpUnhandledException

      Previous Section Next Section