ApiController::BadRequest Method

 

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

NameDescription
System_CAPS_protmethodBadRequest()

Creates a BadRequestResult.

System_CAPS_protmethodBadRequest(ModelStateDictionary^)

Creates an InvalidModelStateResult with the specified model state.

System_CAPS_protmethodBadRequest(String^)

Creates an T:System.Web.Http.Results.ErrorMessageResult (400 Bad Request) with the specified error message.

Return to top

ApiController::BadRequest Method ()

Creates a BadRequestResult.

public protected:
virtual BadRequestResult^ BadRequest()
Return to top

ApiController::BadRequest Method (ModelStateDictionary^)

Creates an InvalidModelStateResult with the specified model state.

public protected:
virtual InvalidModelStateResult^ BadRequest(
	ModelStateDictionary^ modelState
)

Parameters

modelState
Type: System.Web.Http.ModelBinding::ModelStateDictionary^

The model state to include in the error.

Return Value

Type: System.Web.Http.Results::InvalidModelStateResult^

An InvalidModelStateResult with the specified model state.

Return to top

ApiController::BadRequest Method (String^)

Creates an T:System.Web.Http.Results.ErrorMessageResult (400 Bad Request) with the specified error message.

public protected:
virtual BadRequestErrorMessageResult^ BadRequest(
	String^ message
)

Parameters

message
Type: System::String^

The user-visible error message.

Return Value

Type: System.Web.Http.Results::BadRequestErrorMessageResult^

An InvalidModelStateResult with the specified model state.

Return to top
Show: