BeginRequest fires for static files in ASP.NET MVC app

前端 未结 4 1159
庸人自扰
庸人自扰 2021-01-05 23:18

I was under the impression that static files (CSS, images, @font-face files, etc) bypassed ASP.NET completely, and were served directly by IIS.

However, my BeginRe

4条回答
  •  花落未央
    2021-01-05 23:59

    The integrated mode in IIS 7 works differently than it was before.

    You could switch to classic mode if desired.

    Alternatively you can define your custom route handler and do the context initialization there. That way it's only done for specific routes.

提交回复
热议问题