Partager via


ApiController.InternalServerError Method

 

Namespace:   System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

Overload List

Name Description
System_CAPS_protmethod InternalServerError()

Creates an InternalServerErrorResult (500 Internal Server Error).

System_CAPS_protmethod 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

A 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

Return Value

Type: System.Web.Http.Results.ExceptionResult

An ExceptionResult with the specified exception.

Return to top