ASP.NET MVC生命周期介绍
1、Request 请求到来
2、IIS 根据请求特征将处理权移交给 asp.net
3、UrlRoutingModule将当前请求在 Route Table中进行匹配
4、UrlRoutingModule在RouteCollection中查找Request匹配的RouteHandler,默认是mvcRouteHandler mvcRouteHandler 创建 mvcHandler实例.
5、mvcHandler执行 ProcessRequest.
6、mvcHandler 使用 IControllerFactory 获得实现了IController接口的实例,找到对应的HomeController
7、根据Request触发HomeController的Index方法
8、Index将执行结果存放在ViewData
9、HomeController的Index方法返回 ActionResult
10、Views/Home/Index.aspx将 ViewData呈现在页面上
11、Index.aspx执行ProcessRequest方法
12、Index.aspx执行Render方法 输出到客户端