This documentation is archived and is not being maintained.

HttpException.GetHttpCode Method

Returns the HTTP error code to send back to the client. If there is a nonzero HTTP code, it is returned. Otherwise, the InnerException code is returned. If neither an InnerException code nor a nonzero HTTP code is available, the HTTP error code 500 is returned.

[Visual Basic]
Public Function GetHttpCode() As Integer
[C#]
public int GetHttpCode();
[C++]
public: int GetHttpCode();
[JScript]
public function GetHttpCode() : int;

Return Value

The HTTP code representing the exception.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpException Class | HttpException Members | System.Web Namespace

Show: