Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > First ISAPI Filter
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 22nd April 02:57
kevin_c_r
External User
 
Posts: 1
Default First ISAPI Filter



Hi,

Can anyone help me or point me in the right direction?

asp page severed via my web site?

Can anyone help with how I would go about creating an isapi filter
which could do this for me?

Thanks
Kevin
  Reply With Quote


  sponsored links


2 22nd April 02:57
david wang [msft]
External User
 
Posts: 1
Default First ISAPI Filter



While an ISAPI Filter can add data to the response, it does it at a data
stream level, not HTTP level. Thus, you need to be fully aware of HTTP
rules:
1. If the response is chunked, you must insert the chunk properly
2. If the response is Content-Length, you must modify it to account for the
extra data you added
3. Any Caching implications?

Since the Content-Length header will be sent prior to your decision to add
data to the entity body, you must somehow buffer the entire response, modify
what you need, and send it all back out.

Finally, you need to determine from the data stream where your data
insertion point is going to be. The insertion point could be across HTTP
packets (i.e. cross multiple ISAPI Filter events).


In the end, it's not as easy as just "write an ISAPI Filter which will add a
small piece of html and java script".

IIS has configuration to add "HTML Footers" to static HTML pages, so that
should solve your HTML needs. ASP is not covered.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights. //
"Kevin" <kevin_c_r@yahoo.com> wrote in message
news:ce15b76b.0312080715.bef68f0@posting.google.co m...
Hi,

Can anyone help me or point me in the right direction?

I've never written an isapi filter before, but I need to write one
which will add a small piece of html and java script to every html or
asp page severed via my web site?

Can anyone help with how I would go about creating an isapi filter
which could do this for me?

Thanks
Kevin
  Reply With Quote
3 22nd April 02:57
kevin_c_r
External User
 
Posts: 1
Default First ISAPI Filter


Hi David,

Thanks you for the reply,

Yes I know IIS can automatically add a footer, but my web site is a
mixture of html and asp pages which I can't change to all be html.

Can you recommend any starting points for building this kind of ISAPI
filter?

Thanks
Kevin
  Reply With Quote
4 22nd April 02:57
david wang [msft]
External User
 
Posts: 1
Default First ISAPI Filter


My previous reply would be the starting point.

You could try reading ISAPI Filter do***entation on MSDN, download the
Platform SDK to look at sample ISAPI Filters, and see how easy it is to
crash/hang IIS... I mean, write, your first ISAPI Filter.

You can also try to search around to see if anyone else has a working filter
to do this. In my experience, many ISAPI Filters found "in the wild" are
not the most stable nor error-free things to put on a server at all,
considering how easy it is to crash/hang IIS or a browser if you do anything
incorrectly...

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//


Hi David,

Thanks you for the reply,

Yes I know IIS can automatically add a footer, but my web site is a
mixture of html and asp pages which I can't change to all be html.

Can you recommend any starting points for building this kind of ISAPI
filter? Thanks Kevin
"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:<e1JjmIdvDHA.540@tk2msftngp13.phx.gbl>...


rights.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666