Hmm, Am I the only guy working with HttpModules? 
Author Message
 Hmm, Am I the only guy working with HttpModules?

I asked a couple of questions about HttpModules but no one answered. To
recap:

1. Poolability of HttpModules.

Why doesn't the IHttpModule interface provide an IsReusable property like
the IHttpHandler interface does? Are HttpModules simply not poolable? Or are
they by definition pooled?

2. Interception of Handler's output.

I'm writing an HttpModule filter for my web application. Fairly standard,
the module prepends header sections and appends footer sections onto every
page request. But one thing I'd like to do as well, is process the response
stream which is generated by the ASPX handler page itself. If that data is
already in the Response buffer then it's probably untouchable. Or is there
an event which I can tap into to process this data just before it is
inserted into the response buffer?

Any help which you can offer will be most gratefully accepted.

Thanks,

- Joe Geretz -



Tue, 24 May 2005 13:43:54 GMT  
 Hmm, Am I the only guy working with HttpModules?
Hi!

I also created these ones. :-)

Quote:
> I asked a couple of questions about HttpModules but no one answered. To
> recap:

> 1. Poolability of HttpModules.

> Why doesn't the IHttpModule interface provide an IsReusable property like
> the IHttpHandler interface does? Are HttpModules simply not poolable? Or
are
> they by definition pooled?

I suppose there is no sense in caching since only one instance of the
specified http module
exists in memory.

An HTTP module is an assembly that implements the IhttpModule interface and
handles events.

It's purpose to initialize, dispose some environment and process events that
module
can optionally listen.

Quote:
> 2. Interception of Handler's output.

> I'm writing an HttpModule filter for my web application. Fairly standard,
> the module prepends header sections and appends footer sections onto every
> page request. But one thing I'd like to do as well, is process the
response
> stream which is generated by the ASPX handler page itself. If that data is
> already in the Response buffer then it's probably untouchable. Or is there
> an event which I can tap into to process this data just before it is
> inserted into the response buffer?

Help says that there is event to listen:

PreSendRequestContent
  Signals that content is about to be sent to the client.
  This provides an opportunity to modify the content before it is sent.

You can experiment with it. Unfortunately help does not say anything
how to do this. But I think this is a good start point.

--
Vladimir Nesterovsky



Wed, 25 May 2005 01:40:22 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Thanks guys It worked

2. Am I working on the right lines... (long)

3. ifstream won't work or am i dumb

4. Hmm copy and paste quandry - beyond the Clipboard

5. Hmm, string constant parsing?

6. hmm..

7. hmm, gcc 2.7.x

8. Hmm Resources

9. Custom HttpModule

10. HTTPHandler or HTTPModule

11. I am new to programming and am lost

12. Thank you, guys

 

 
Powered by phpBB® Forum Software