That is NOT a fairly simple question!!!
Based on your description, your Filter is a prime candidate for conversion
into an ISAPI Extension configured as a Wildcard Application Mapping on
IIS6.
Since IIS5, it has been possible for an ISAPI Extension to run for any URL
on the entire web server (including website), but with IIS6, it became
possible for the ISAPI Extension to "hand off" anything it couldn't handle
back to IIS to be processed by the actual handler. This ability enables an
ISAPI Extension to "filter" all incoming requests (including entity body --
something that is difficult for ISAPI Filters), decide what to do with it,
and either handle the request or give it back to IIS to be processed.
The ISAPI Extension functionality that you want to look up is
HSE_REQ_EXEC_URL.
Description of Wildcard Application Mapping:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisre...tm/Wild
How to install Wildcard Application Mapping:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/pro...chnol/w
The underlying function that enables the Wildcard Application Mapping to
function like a request "filter":
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisre...tm/Exte
(you'll want to use the OCT 2003 MSDN Refresh of the documentation, which
has all the corrections/improvements I've made).
I know there's another document on the Wildcard Application Mapping concept,
but I can't seem to find it at the moment.
I expect you'll have more technical questions on "how do I actually build
such a thing?", which you should post to:
microsoft.public.platformsdk.internet.server.isapi-dev
The ISAPI Extension basically:
1. Configure as Wildcard Application Mapping
2. Decide what you want to do.
-- if you want to do nothing, call HSE_REQ_EXEC_URL with everything NULL in
the structure (especially pszUrl=NULL), and you are done
-- if you want to redirect and stop this request, check for POST as a verb
and any entity body. Read in entity body, either synchronous or
asynchronous ReadClient, as necessary. Deal with chunked encoding as
appropriate. If the entity body is <48K (configured as
W3SVC/UploadReadAheadSize), you get the entity body, de-chunked and all, for
free. Then send the 302 response as you wish.
FAR simpler than ISAPI Filters mucking around with SF_NOTIFY_READ_RAW_DATA
because you have the richer functionality of ISAPI Extensions.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Chris Purdum" <ChrisPurdum DeleteThis @cs.com> wrote in message
news:boeiqg$724$1@pixie.nscp.aoltw.net...
Hi all. Here's a fairly simple question: Does anybody know of a way to
get the POST Data from a request in an ISAPI Filter without using
SF_NOTIFY_READ_RAW_DATA? I'm trying to port an existing filter to IIS
6.0 and it doesn't support SF_NOTIFY_READ_RAW_DATA unless you go into
IIS 5.0 compatibility mode, which I'd rather not do.
So, since all I need is the POST data, is there another way to get it?
The reason I want this in a filter instead of an extension is that it
could run for any URL on the site, and sometimes, it redirects users, in
which case, we need to hang on to the POST data somehow so it's not lost
with the 302.
Thanks
Chris