This documentation is archived and is not being maintained.
HttpException::GetHttpCode Method
Visual Studio 2010
Gets the HTTP response status code to return to the client.
Assembly: System.Web (in System.Web.dll)
Return Value
Type: System::Int32A non-zero HTTP code representing the exception or the InnerException code; otherwise, HTTP response status code 500.
If there is a non-zero HTTP code, it is returned. Otherwise, the InnerException code is returned. If neither an InnerException code nor a non-zero HTTP code is available, the HTTP response status code 500 is returned. For more information on HTTP response status codes, see the Status Code Definitions of the Hypertext Transfer Protocol - HTTP/1.1 on the World Wide Web Consortium (W3C) Web site.
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
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: