防止 MS Web 开发服务器 (Cassini) 运行 HttpModule 来处理静态内容请求

发布于 2024-07-29 17:56:19 字数 451 浏览 1 评论 0原文

IIS7 通过使用 配置元素来设置模块的 preCondition="managementHandler" 属性来支持此功能。

由于 Cassini 是托管服务器,因此它以与 IIS7 类似的方式处理请求。 所有请求均由托管代码处理。 我所说的“类似”是指它为每个请求执行 HttpModule,即使它是静态内容(脚本、样式表、图像等)。

Cassini 似乎还会忽略 配置设置。

:是否可以强制 Cassini 不执行静态内容的完整管道或遵守 设置?

IIS7 supports this by using <system.webServer> configuration element to set module's preCondition="managedHandler" attribute.

Since Cassini is a managed server it serves requests in a similar way as IIS7 does. All requests are handled by managed code. By similar I mean it executes HttpModules for every single request even if it's static content (scripts, style sheets, images etc.).

It also appears that Cassini ignores <system.webServer> configuration settings.

Q: Is it possible to either force Cassini not to execute complete pipeline for static content or to obey <system.webServer> settings?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吻泪 2024-08-05 17:56:19

不,这不对。 这就是为什么针对 IIS 进行测试始终是一个好主意:)

No it's not. Which is why testing against IIS is always a good idea :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文