[英]Set up RAMMFAR for certain paths only
I have an ASP.NET 4.5 MVC app. 我有一个ASP.NET 4.5 MVC应用程序。 I don't want to set RAMMFAR ( runAllManagedModulesForAllRequests
) because that would needlessly send requests for static resources through the ASP.NET pipeline; 我不想设置RAMMFAR( runAllManagedModulesForAllRequests
),因为这会通过ASP.NET管道不必要地发送静态资源请求; however I do want all requests which begin with the path /Download/
to run through the ASP.NET routing pipeline, regardless of extension. 但是我确实希望所有以path /Download/
开头的请求都通过ASP.NET路由管道运行,而不管扩展名如何。 This way I can route them to a Controller and serve dynamically generated resources. 这样我就可以将它们路由到Controller并提供动态生成的资源。
How can this be done? 如何才能做到这一点? I do not have access to IIS settings but hopefully there is a way to do this through web.config
. 我无法访问IIS设置,但希望有一种方法可以通过web.config
执行此操作。
The RAMMFAR setting is per application. RAMMFAR设置是每个应用程序。 You'd have to create a separate IIS applications if you want different parts of the site to have different settings, but unfortunately you state this is not an option for you. 如果您希望站点的不同部分具有不同的设置,则必须创建单独的IIS应用程序,但不幸的是,您声明这不适合您。
I two have two side notes though: 我两个有两个旁注:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.