今天来看一下asp.net core的执行管道。先看下官方说明:
从上图可以抛光,asp.net core的执行顺序是,当收到一个请求后,request请求会先经过已注册的中间件,然后会进入到mvc的拦截器管道:
进入mvc管道后,根据以上顺序执行过滤校正。
OK,根据以上说明下面我们新建一个MVC的演示,将执行方式切换为控台运行:
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServ