This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A base class for an MVC controller without view support.
public ref class ControllerBase abstract
[Microsoft.AspNetCore.Mvc.Controller]public abstract class ControllerBase
[<Microsoft.AspNetCore.Mvc.Controller>]type ControllerBase = class
Public MustInherit Class ControllerBase
ControllerBase() |
ControllerContext | Gets or sets theControllerContext. |
Empty | Gets an instance ofEmptyResult. |
HttpContext | Gets theHttpContext for the executing action. |
MetadataProvider | Gets or sets theIModelMetadataProvider. |
ModelBinderFactory | Gets or sets theIModelBinderFactory. |
ModelState | Gets theModelStateDictionary that contains the state of the model and of model-binding validation. |
ObjectValidator | Gets or sets theIObjectModelValidator. |
ProblemDetailsFactory | Gets or sets theProblemDetailsFactory. |
Request | Gets theHttpRequest for the executing action. |
Response | Gets theHttpResponse for the executing action. |
RouteData | Gets theRouteData for the executing action. |
Url | Gets or sets theIUrlHelper. |
User | Gets theClaimsPrincipal for user associated with the executing action. |
Accepted() | Creates anAcceptedResult object that produces aStatus202Accepted response. |
Accepted(Object) | Creates anAcceptedResult object that produces aStatus202Accepted response. |
Accepted(String, Object) | Creates anAcceptedResult object that produces aStatus202Accepted response. |
Accepted(String) | Creates anAcceptedResult object that produces aStatus202Accepted response. |
Accepted(Uri, Object) | Creates anAcceptedResult object that produces aStatus202Accepted response. |
Accepted(Uri) | Creates anAcceptedResult object that produces aStatus202Accepted response. |
AcceptedAtAction(String, Object, Object) | Creates anAcceptedAtActionResult object that produces aStatus202Accepted response. |
AcceptedAtAction(String, Object) | Creates anAcceptedAtActionResult object that produces aStatus202Accepted response. |
AcceptedAtAction(String, String, Object, Object) | Creates anAcceptedAtActionResult object that produces aStatus202Accepted response. |
AcceptedAtAction(String, String, Object) | Creates anAcceptedAtActionResult object that produces aStatus202Accepted response. |
AcceptedAtAction(String, String) | Creates anAcceptedAtActionResult object that produces aStatus202Accepted response. |
AcceptedAtAction(String) | Creates anAcceptedAtActionResult object that produces aStatus202Accepted response. |
AcceptedAtRoute(Object, Object) | Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response. |
AcceptedAtRoute(Object) | Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response. |
AcceptedAtRoute(String, Object, Object) | Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response. |
AcceptedAtRoute(String, Object) | Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response. |
AcceptedAtRoute(String) | Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response. |
BadRequest() | Creates aBadRequestResult that produces aStatus400BadRequest response. |
BadRequest(ModelStateDictionary) | Creates aBadRequestObjectResult that produces aStatus400BadRequest response. |
BadRequest(Object) | Creates aBadRequestObjectResult that produces aStatus400BadRequest response. |
Challenge() | Creates aChallengeResult. |
Challenge(AuthenticationProperties, String[]) | Creates aChallengeResult with the specified specified authentication schemes and |
Challenge(AuthenticationProperties, String[]) | Creates aChallengeResult with the specified authentication schemes and |
Challenge(AuthenticationProperties) | Creates aChallengeResult with the specified |
Challenge(AuthenticationProperties) | Creates aChallengeResult with the specified |
Challenge(String[]) | Creates aChallengeResult with the specified authentication schemes. |
Conflict() | Creates aConflictResult that produces aStatus409Conflict response. |
Conflict(ModelStateDictionary) | Creates aConflictObjectResult that produces aStatus409Conflict response. |
Conflict(Object) | Creates aConflictObjectResult that produces aStatus409Conflict response. |
Content(String, MediaTypeHeaderValue) | Creates aContentResult object by specifying a |
Content(String, String, Encoding) | Creates aContentResult object by specifying a |
Content(String, String) | Creates aContentResult object by specifying a |
Content(String) | Creates aContentResult object by specifying a |
Created() | Creates aCreatedResult object that produces aStatus201Created response. |
Created(String, Object) | Creates aCreatedResult object that produces aStatus201Created response. |
Created(Uri, Object) | Creates aCreatedResult object that produces aStatus201Created response. |
CreatedAtAction(String, Object, Object) | Creates aCreatedAtActionResult object that produces aStatus201Created response. |
CreatedAtAction(String, Object) | Creates aCreatedAtActionResult object that produces aStatus201Created response. |
CreatedAtAction(String, String, Object, Object) | Creates aCreatedAtActionResult object that produces aStatus201Created response. |
CreatedAtRoute(Object, Object) | Creates aCreatedAtRouteResult object that produces aStatus201Created response. |
CreatedAtRoute(String, Object, Object) | Creates aCreatedAtRouteResult object that produces aStatus201Created response. |
CreatedAtRoute(String, Object) | Creates aCreatedAtRouteResult object that produces aStatus201Created response. |
File(Byte[], String, Boolean) | Returns a file with the specified |
File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) | Returns a file with the specified |
File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue) | Returns a file with the specified |
File(Byte[], String, String, Boolean) | Returns a file with the specified |
File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) | Returns a file with the specified |
File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) | Returns a file with the specified |
File(Byte[], String, String) | Returns a file with the specified |
File(Byte[], String) | Returns a file with the specified |
File(Stream, String, Boolean) | Returns a file in the specified |
File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) | Returns a file in the specified |
File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) | Returns a file in the specified |
File(Stream, String, String, Boolean) | Returns a file in the specified |
File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) | Returns a file in the specified |
File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) | Returns a file in the specified |
File(Stream, String, String) | Returns a file in the specified |
File(Stream, String) | Returns a file in the specified |
File(String, String, Boolean) | Returns the file specified by |
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) | Returns the file specified by |
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) | Returns the file specified by |
File(String, String, String, Boolean) | Returns the file specified by |
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) | Returns the file specified by |
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) | Returns the file specified by |
File(String, String, String) | Returns the file specified by |
File(String, String) | Returns the file specified by |
Forbid() | Creates aForbidResult (Status403Forbidden by default). |
Forbid(AuthenticationProperties, String[]) | Creates aForbidResult (Status403Forbidden by default) with thespecified authentication schemes and |
Forbid(AuthenticationProperties, String[]) | Creates aForbidResult with the specified specified authentication schemes and |
Forbid(AuthenticationProperties) | Creates aForbidResult (Status403Forbidden by default) with thespecified |
Forbid(AuthenticationProperties) | Creates aForbidResult with the specified |
Forbid(String[]) | Creates aForbidResult (Status403Forbidden by default) with thespecified authentication schemes. |
LocalRedirect(String) | Creates aLocalRedirectResult object that redirects(Status302Found) to the specified local |
LocalRedirectPermanent(String) | Creates aLocalRedirectResult object withPermanent set totrue (Status301MovedPermanently) using the specified |
LocalRedirectPermanentPreserveMethod(String) | Creates aLocalRedirectResult object withPermanent set totrue andPreserveMethod set to true(Status308PermanentRedirect) using the specified |
LocalRedirectPreserveMethod(String) | Creates aLocalRedirectResult object withPermanent set tofalse andPreserveMethod set to true(Status307TemporaryRedirect) using the specified |
NoContent() | Creates aNoContentResult object that produces an emptyStatus204NoContent response. |
NotFound() | Creates aNotFoundResult that produces aStatus404NotFound response. |
NotFound(Object) | Creates aNotFoundObjectResult that produces aStatus404NotFound response. |
Ok() | Creates anOkResult object that produces an emptyStatus200OK response. |
Ok(Object) | Creates anOkObjectResult object that produces aStatus200OK response. |
PhysicalFile(String, String, Boolean) | Returns the file specified by |
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) | Returns the file specified by |
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) | Returns the file specified by |
PhysicalFile(String, String, String, Boolean) | Returns the file specified by |
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) | Returns the file specified by |
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) | Returns the file specified by |
PhysicalFile(String, String, String) | Returns the file specified by |
PhysicalFile(String, String) | Returns the file specified by |
Problem(String, String, Nullable<Int32>, String, String, IDictionary<String,Object>) | Creates anObjectResult that produces aProblemDetails response. |
Problem(String, String, Nullable<Int32>, String, String) | Creates anObjectResult that produces aProblemDetails response. |
Redirect(String) | Creates aRedirectResult object that redirects (Status302Found)to the specified |
RedirectPermanent(String) | Creates aRedirectResult object withPermanent set to true(Status301MovedPermanently) using the specified |
RedirectPermanentPreserveMethod(String) | Creates aRedirectResult object withPermanent set to trueandPreserveMethod set to true (Status308PermanentRedirect)using the specified |
RedirectPreserveMethod(String) | Creates aRedirectResult object withPermanent set to falseandPreserveMethod set to true (Status307TemporaryRedirect)using the specified |
RedirectToAction() | Redirects (Status302Found) to an action with the same name as current one.The 'controller' and 'action' names are retrieved from the ambient values of the current request. |
RedirectToAction(String, Object) | Redirects (Status302Found) to the specified action using the |
RedirectToAction(String, String, Object, String) | Redirects (Status302Found) to the specified action using the specified |
RedirectToAction(String, String, Object) | Redirects (Status302Found) to the specified action using the specified |
RedirectToAction(String, String, String) | Redirects (Status302Found) to the specified action using the specified |
RedirectToAction(String, String) | Redirects (Status302Found) to the specified action using the |
RedirectToAction(String) | Redirects (Status302Found) to the specified action using the |
RedirectToActionPermanent(String, Object) | Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specified |
RedirectToActionPermanent(String, String, Object, String) | Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specified |
RedirectToActionPermanent(String, String, Object) | Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specified |
RedirectToActionPermanent(String, String, String) | Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specified |
RedirectToActionPermanent(String, String) | Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specified |
RedirectToActionPermanent(String) | Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specified |
RedirectToActionPermanentPreserveMethod(String, String, Object, String) | Redirects (Status308PermanentRedirect) to the specified action withPermanent set to true andPreserveMethodset to true, using the specified |
RedirectToActionPreserveMethod(String, String, Object, String) | Redirects (Status307TemporaryRedirect) to the specified action withPermanent set to false andPreserveMethodset to true, using the specified |
RedirectToPage(String, Object) | Redirects (Status302Found) to the specified |
RedirectToPage(String, String, Object, String) | Redirects (Status302Found) to the specified |
RedirectToPage(String, String, Object) | Redirects (Status302Found) to the specified |
RedirectToPage(String, String, String) | Redirects (Status302Found) to the specified |
RedirectToPage(String, String) | Redirects (Status302Found) to the specified |
RedirectToPage(String) | Redirects (Status302Found) to the specified |
RedirectToPagePermanent(String, Object) | Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String, String, Object, String) | Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String, String, String) | Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String, String) | Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String) | Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanentPreserveMethod(String, String, Object, String) | Redirects (Status308PermanentRedirect) to the specified route withPermanent set to true andPreserveMethodset to true, using the specified |
RedirectToPagePreserveMethod(String, String, Object, String) | Redirects (Status307TemporaryRedirect) to the specified page withPermanent set to false andPreserveMethodset to true, using the specified |
RedirectToRoute(Object) | Redirects (Status302Found) to the specified route using the specified |
RedirectToRoute(String, Object, String) | Redirects (Status302Found) to the specified route using the specified |
RedirectToRoute(String, Object) | Redirects (Status302Found) to the specified route using the specified |
RedirectToRoute(String, String) | Redirects (Status302Found) to the specified route using the specified |
RedirectToRoute(String) | Redirects (Status302Found) to the specified route using the specified |
RedirectToRoutePermanent(Object) | Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specified |
RedirectToRoutePermanent(String, Object, String) | Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specified |
RedirectToRoutePermanent(String, Object) | Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specified |
RedirectToRoutePermanent(String, String) | Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specified |
RedirectToRoutePermanent(String) | Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specified |
RedirectToRoutePermanentPreserveMethod(String, Object, String) | Redirects (Status308PermanentRedirect) to the specified route withPermanent set to true andPreserveMethodset to true, using the specified |
RedirectToRoutePreserveMethod(String, Object, String) | Redirects (Status307TemporaryRedirect) to the specified route withPermanent set to false andPreserveMethodset to true, using the specified |
SignIn(ClaimsPrincipal, AuthenticationProperties, String) | Creates aSignInResult with the specified specified authentication scheme and |
SignIn(ClaimsPrincipal, AuthenticationProperties, String) | Creates aSignInResult with the specified authentication scheme and |
SignIn(ClaimsPrincipal, AuthenticationProperties) | Creates aSignInResult with |
SignIn(ClaimsPrincipal, String) | Creates aSignInResult with the specified authentication scheme. |
SignIn(ClaimsPrincipal) | Creates aSignInResult. |
SignOut() | Creates aSignOutResult. |
SignOut(AuthenticationProperties, String[]) | Creates aSignOutResult with the specified authentication schemes and |
SignOut(AuthenticationProperties, String[]) | Creates aSignOutResult with the specified specified authentication schemes and |
SignOut(AuthenticationProperties) | Creates aSignOutResult with |
SignOut(String[]) | Creates aSignOutResult with the specified authentication schemes. |
StatusCode(Int32, Object) | Creates anObjectResult object by specifying a |
StatusCode(Int32) | Creates aStatusCodeResult object by specifying a |
TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>) | Updates the specified |
TryUpdateModelAsync(Object, Type, String) | Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[]) | Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>) | Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[]) | Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>) | Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider) | Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String) | Updates the specified |
TryUpdateModelAsync<TModel>(TModel) | Updates the specified |
TryValidateModel(Object, String) | Validates the specified |
TryValidateModel(Object) | Validates the specified |
Unauthorized() | Creates anUnauthorizedResult that produces aStatus401Unauthorized response. |
Unauthorized(Object) | Creates anUnauthorizedObjectResult that produces aStatus401Unauthorized response. |
UnprocessableEntity() | Creates anUnprocessableEntityResult that produces aStatus422UnprocessableEntity response. |
UnprocessableEntity(ModelStateDictionary) | Creates anUnprocessableEntityObjectResult that produces aStatus422UnprocessableEntity response. |
UnprocessableEntity(Object) | Creates anUnprocessableEntityObjectResult that produces aStatus422UnprocessableEntity response. |
ValidationProblem() | Creates anActionResult that produces aStatus400BadRequest responsewith validation errors fromModelState. |
ValidationProblem(ModelStateDictionary) | Creates anActionResult that produces aStatus400BadRequest responsewith validation errors from |
ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary, IDictionary<String,Object>) | Creates anActionResult that produces aStatus400BadRequest responsewith aValidationProblemDetails value. |
ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary) | Creates anActionResult that produces aStatus400BadRequest responsewith aValidationProblemDetails value. |
ValidationProblem(ValidationProblemDetails) | Creates aBadRequestObjectResult that produces aStatus400BadRequest response. |
Was this page helpful?
Was this page helpful?