Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Thu, 24 Jan 2008 14:20:30 -0800,    group: microsoft.public.platformsdk.internet.server.isapi-dev        back       


How to get postdata from isapi filter?   
I am trying to write a filter to do "post" processing (process the webpage 
that is otherwise ready to be sent to the client).  However, I would also 
like to have access to the entire postdata (eg the page is from a submitted 
form).

Here is what I found out:
1) my filter has to register for SF_NOTIFY_READ_RAW_DATA.  This forces my 
filter to be registered as a global filter.
2) I will get notified ONLY if the actual handler (extension that processes 
the page) requests postdata (eg do a ReadClient to pull the posted data).  
Otherwise, my filter will not be called and I do not the postdata.

Questions:
1) How can I (as a filter) get the postdata regardless if the hander 
requests the postdata?
2) Related, I would like to get all the HTTP headers and server variables as 
well.  When (which event(s)) would be a good place to do that?  Is there any 
way to get ALL of them (like in extension).

Thanks for any help in advance!
date: Thu, 24 Jan 2008 14:20:30 -0800   author:   John

Re: How to get postdata from isapi filter?   
On Jan 24, 2:20 pm, John  wrote:
> I am trying to write a filter to do "post" processing (process the webpage> that is otherwise ready to be sent to the client).  However, I would also
> like to have access to the entire postdata (eg the page is from a submitted
> form).
>
> Here is what I found out:
> 1) my filter has to register for SF_NOTIFY_READ_RAW_DATA.  This forces my
> filter to be registered as a global filter.
> 2) I will get notified ONLY if the actual handler (extension that processes
> the page) requests postdata (eg do a ReadClient to pull the posted data).  
> Otherwise, my filter will not be called and I do not the postdata.
>
> Questions:
> 1) How can I (as a filter) get the postdata regardless if the hander
> requests the postdata?
> 2) Related, I would like to get all the HTTP headers and server variables as
> well.  When (which event(s)) would be a good place to do that?  Is there any
> way to get ALL of them (like in extension).
>
> Thanks for any help in advance!


For which IIS version?

Your approach is really, really bad. If you want to parse raw input/
output data, why don't you write your own proxy server in front of IIS
to do what you want. What you are trying to do kills SSL and response
caching on IIS.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
date: Thu, 24 Jan 2008 16:45:21 -0800 (PST)   author:   David Wang

Re: How to get postdata from isapi filter?   
"David Wang" wrote:

> On Jan 24, 2:20 pm, John  wrote:
> > I am trying to write a filter to do "post" processing (process the webpage
> > that is otherwise ready to be sent to the client).  However, I would also
> > like to have access to the entire postdata (eg the page is from a submitted
> > form).
> >
> > Here is what I found out:
> > 1) my filter has to register for SF_NOTIFY_READ_RAW_DATA.  This forces my
> > filter to be registered as a global filter.
> > 2) I will get notified ONLY if the actual handler (extension that processes
> > the page) requests postdata (eg do a ReadClient to pull the posted data).  
> > Otherwise, my filter will not be called and I do not the postdata.
> >
> > Questions:
> > 1) How can I (as a filter) get the postdata regardless if the hander
> > requests the postdata?
> > 2) Related, I would like to get all the HTTP headers and server variables as
> > well.  When (which event(s)) would be a good place to do that?  Is there any
> > way to get ALL of them (like in extension).
> >
> > Thanks for any help in advance!
> 
> 
> For which IIS version?
> 
> Your approach is really, really bad. If you want to parse raw input/
> output data, why don't you write your own proxy server in front of IIS
> to do what you want. What you are trying to do kills SSL and response
> caching on IIS.
> 
> 
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
Thanks David,
    Can you provide more info about how to do that with a proxy server (eg 
samples, tutorial, etc)?  I do not know too much about that.
date: Fri, 25 Jan 2008 08:58:03 -0800   author:   John

Re: How to get postdata from isapi filter?   
"John" wrote:

> 
> 
> "David Wang" wrote:
> 
> > On Jan 24, 2:20 pm, John  wrote:
> > > I am trying to write a filter to do "post" processing (process the webpage
> > > that is otherwise ready to be sent to the client).  However, I would also
> > > like to have access to the entire postdata (eg the page is from a submitted
> > > form).
> > >
> > > Here is what I found out:
> > > 1) my filter has to register for SF_NOTIFY_READ_RAW_DATA.  This forces my
> > > filter to be registered as a global filter.
> > > 2) I will get notified ONLY if the actual handler (extension that processes
> > > the page) requests postdata (eg do a ReadClient to pull the posted data).  
> > > Otherwise, my filter will not be called and I do not the postdata.
> > >
> > > Questions:
> > > 1) How can I (as a filter) get the postdata regardless if the hander
> > > requests the postdata?
> > > 2) Related, I would like to get all the HTTP headers and server variables as
> > > well.  When (which event(s)) would be a good place to do that?  Is there any
> > > way to get ALL of them (like in extension).
> > >
> > > Thanks for any help in advance!
> > 
> > 
> > For which IIS version?
> > 
> > Your approach is really, really bad. If you want to parse raw input/
> > output data, why don't you write your own proxy server in front of IIS
> > to do what you want. What you are trying to do kills SSL and response
> > caching on IIS.
> > 
> > 
> > //David
> > http://w3-4u.blogspot.com
> > http://blogs.msdn.com/David.Wang
> > //
Thanks again David,
      I have read some of yours posts about the concerns (particularly this 
very good one -- 
http://blogs.msdn.com/david.wang/archive/2006/05/10/HOWTO-Access-POST-form-data-with-ISAPI.aspx). 
 We may have to proceed with getting the postdata in the filter.  Is it true 
that if the handler does not request postdata, then there is no way for the 
filter to get it or there are ways the filter can still get it?
date: Fri, 25 Jan 2008 10:01:03 -0800   author:   John

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us