http 处理程序的默认操作?

发布于 2024-08-30 15:33:51 字数 302 浏览 0 评论 0原文

我正在建立一个站点,该站点使用 ihttpmodule 控制对下载目录的访问。由于文件都是 zip、exe、rar 等,因此不会应用默认处理程序,并且会话状态不可用。因此,我为该目录添加了一个使用 IRequiredSessionState 的自定义 http 处理程序,以便我的会话现在在我的模块中可用。但是,我不知道如何处理处理程序中的流程请求方法。有没有办法调用处理请求的默认操作?因为我想做的是提供下载服务,所以我要做的最接近的是 context.Response.TrasmitFile() 吗?到那时,拥有 http 模块是否有任何意义,并且只需在处理程序中进行安全检查?谢谢!

I'm working on setting up a site that controls access to a directory for downloads using an ihttpmodule. Since the files are all zip, exe, rar, and so on, the default handler isn't being applied and session state isn't available. So I've added a custom http handler for that directory that uses IRequiredSessionState so my session is now available in my module. However, I'm at a loss as to what to do with with the process request method in the handler. Is there any way to call the default action for process request? Since what I'm trying to do is serve downloads, is the closest I'm going to get going to be doing a context.Response.TrasmitFile()? At that point, is there even any point in having the http module, and just do my security check in the handler? Thanks!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文