Asp.Net Mvc - is it running onactionexecuted, is it called before or after ActionResult.Execute?

Is it called Controller.OnActionExecutedbefore or after ActionResult.Execute?

Is there a timeline somewhere in the order in which events occur? I can not find anything with google-fu.

+5
source share
2 answers

A call to Controller.OnActionExecuted is made.

See this post on MSDN, it covers the controller pipeline for MVC.

  • Get the first request for the application
  • Routing Execution
  • Create MVC Request Handler
  • Create controller
  • Run controller
  • Trigger action
  • Execution result
+8
source

Below is a snapshot showing how execution is performed.

http://www.asp.net/mvc/overview/older-versions-1/controllers-and-routing/understanding-action-filters-cs

, . , , , .

, . , .

MVC Life Cycle

: - http://www.dotnetinterviewquestions.in/article_explain-mvc-application-life-cycle_210.html

: https://www.codeproject.com/Articles/556995/ASP-NET-MVC-interview-questions-with-answers

- , , , . MVC , , , .

: - . .

1 : - MVC , , , , . , , , , - . global.asax.

2 : - URL-, "UrlRoutingModule", "RouteData", , .

3 : - "RouteData" "RequestContext".

4 : - "MvcHandler" . , "" .

: - , , , , .

+4

All Articles