Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace:   System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)
Overload List
| Name | Description | |
|---|---|---|
| .jpeg) | InternalServerError() | Creates an InternalServerErrorResult (500 Internal Server Error). | 
| .jpeg) | InternalServerError(Exception) | Creates an ExceptionResult (500 Internal Server Error) with the specified exception. | 
See Also
ApiController Class
System.Web.Http Namespace
Return to top
ApiController.InternalServerError Method ()
Creates an InternalServerErrorResult (500 Internal Server Error).
Syntax
protected internal virtual InternalServerErrorResult InternalServerError()
public protected:
virtual InternalServerErrorResult^ InternalServerError()
abstract InternalServerError : unit -> InternalServerErrorResult
override InternalServerError : unit -> InternalServerErrorResult
Protected Friend Overridable Function InternalServerError As InternalServerErrorResult
Return Value
Type: System.Web.Http.Results.InternalServerErrorResult
Return to top
ApiController.InternalServerError Method (Exception)
Creates an ExceptionResult (500 Internal Server Error) with the specified exception.
Syntax
protected internal virtual ExceptionResult InternalServerError(
    Exception exception
)
public protected:
virtual ExceptionResult^ InternalServerError(
    Exception^ exception
)
abstract InternalServerError : 
        exception:Exception -> ExceptionResult
override InternalServerError : 
        exception:Exception -> ExceptionResult
Protected Friend Overridable Function InternalServerError (
    exception As Exception
) As ExceptionResult
Parameters
- exception 
 Type: System.Exception- The exception to include in the error. 
Return Value
Type: System.Web.Http.Results.ExceptionResult
An ExceptionResult with the specified exception.
Return to top