开发者

Managed ISAPI Filter IIS 7.5

开发者 https://www.devze.com 2023-03-21 15:08 出处:网络
Is there any way to write ISAPI Filter functionality in Managed Code (C#) for IIS 7.5? In detail, I need access to the Requests Response Stream, before it is actually sent back to the client to implem

Is there any way to write ISAPI Filter functionality in Managed Code (C#) for IIS 7.5? In detail, I need access to the Requests Response Stream, before it is actually sent back to the client to implement some caching functionality. Via HttpModule or Http开发者_高级运维Handler I only find methods like BeginRequest or ProcessRequest...


You'd need a send_raw_data filter, and just to warn you, those carry a significant performance penalty. It may be enough to offset the benefit of caching, so you should keep that in mind.

I don't know of a way to do this with managed code, other than maybe calling it through some sort of C++ wrapper, but this is a very perf-sensitive code path, so I wouldn't recommend it. ISAPI is designed for C/C++ and you should use it that way.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号