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.
精彩评论