How to retrive POST data?

Nov 28, 2008 at 9:16 AM
Tiago,

I need to analyze POST data that is coming from the form in filter.

I've found an article on MSDN after searching for a while. It says:
"Microsoft does not recommend processing POST data with the OnReadRawData method of an ISAPI filter"

Is it true that I can get POST data in your ReadRawData(SF_NOTIFY_READ_RAW_DATA)?

If so why doesn't this event fire up in my code?

void IHttpFilter.Init(IFilterEvents events)
        {
            events.PreProcHeaders += OnPreProcHeaders;
            events.ReadRawData += OnReadRawData;
            events.SendResponse += OnSendResponse;
        }

        private static void OnReadRawData(object sender, RawDataEventArgs e)
        {
            // IN DEBUG MODE IT WON'T STOP HERE
        }

Btw, thanks for your previous response

Best regards,
Arthur Okolity
Coordinator
Nov 28, 2008 at 8:27 PM
Hi Arthur,

Starting with IIS 6.0 is no longer possible to process POST data in an ISAPI Filter. Only IIS 5.x allows that. Microsoft's proposal is to process POST data using Wildcard ISAPI Extensions, new feature of IIS6.0.

Read more here:
http://blogs.msdn.com/david.wang/archive/2006/04/07/IIS6_and_HTTP_Server_API_Part_1.aspx

regards
Tiago Halm
Dec 2, 2008 at 1:13 PM
Hi Tiago,

So I can't get post data using your project on IIS6?
Or  Filter.Net allows to create custom Wildcard ISAPI Extensions?

Because I don't want to get POST data from IIS 5.x using your project and get POST data from IIS 6.0 using different project.
It will be too difficult.