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: Mon, 21 Jul 2008 01:51:10 -0700 (PDT),    group: microsoft.public.platformsdk.internet.server.isapi-dev        back       


Additional / Second Intercept for ISAPI Call   
Hi,

I work with a .net application that embeds calls to another ISAPI
service to return images.  The images never exist but are streamed
with a request like... .../GetImage.IMG?Size=10,10&Format=PNG&etc
That is from a third party and all works 100%.  Great.

What I would like to do is introduce an additional process (I
originally thought IHttpHandler) to catch the images just before they
are returned to place my own overlay (copyright) on them.  Any
suggestions greatly appreciated.

 Thanks in advance, Cris
date: Mon, 21 Jul 2008 01:51:10 -0700 (PDT)   author:   unknown

Re: Additional / Second Intercept for ISAPI Call   
On Jul 21, 1:51 am, Cris...@gmail.com wrote:
> Hi,
>
> I work with a .net application that embeds calls to another ISAPI
> service to return images.  The images never exist but are streamed
> with a request like... .../GetImage.IMG?Size=10,10&Format=PNG&etc
> That is from a third party and all works 100%.  Great.
>
> What I would like to do is introduce an additional process (I
> originally thought IHttpHandler) to catch the images just before they
> are returned to place my own overlay (copyright) on them.  Any
> suggestions greatly appreciated.
>
>  Thanks in advance, Cris


If the "..." of the request .../GetImage.IMG?
Size=10,10&Format=PNG&etc   is not on your web server, then there is
no way you can do what you want. Remember, the resulting HTML is
processed by the CLIENT, who directly goes to all the different web
servers to get those images. Your SERVER-side code just sees those
requests in the HTML that it passes back to the client and has no
chance to affect them since it never sees any of those data streams.

Based on the description you provided, I suggest that GetImage.IMG add
a new "Copyright" parameter and add the overlay itself, and your
website will pass a string to GetImage.IMG to get it overlayed
whenever your website wants.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
date: Mon, 21 Jul 2008 12:01:05 -0700 (PDT)   author:   David Wang

Re: Additional / Second Intercept for ISAPI Call   
Thnaks for the reply:

All components are on the same server, running under the same IIS site
but with different handlers... so that is why I hoped I could get IIS
to catch the image just before it went back to the client.

Although it would be v nice to have the third-party add additional
copyright parameters this is out of my hands and unlikely to happen in
the near future.

> If the "..." of the request .../GetImage.IMG?
> Size=10,10&Format=PNG&etc   is not on your web server, then there is
> no way you can do what you want. Remember, the resulting HTML is
> processed by the CLIENT, who directly goes to all the different web
> servers to get those images. Your SERVER-side code just sees those
> requests in the HTML that it passes back to the client and has no
> chance to affect them since it never sees any of those data streams.
>
> Based on the description you provided, I suggest that GetImage.IMG add
> a new "Copyright" parameter and add the overlay itself, and your
> website will pass a string to GetImage.IMG to get it overlayed
> whenever your website wants.
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David.Wang
> //
date: Tue, 22 Jul 2008 01:09:02 -0700 (PDT)   author:   unknown

Re: Additional / Second Intercept for ISAPI Call   
On Jul 22, 1:09 am, Cris...@gmail.com wrote:
> Thnaks for the reply:
>
> All components are on the same server, running under the same IIS site
> but with different handlers... so that is why I hoped I could get IIS
> to catch the image just before it went back to the client.
>
> Although it would be v nice to have the third-party add additional
> copyright parameters this is out of my hands and unlikely to happen in
> the near future.
>
>
>
> > If the "..." of the request .../GetImage.IMG?
> > Size=10,10&Format=PNG&etc   is not on your web server, then there is
> > no way you can do what you want. Remember, the resulting HTML is
> > processed by the CLIENT, who directly goes to all the different web
> > servers to get those images. Your SERVER-side code just sees those
> > requests in the HTML that it passes back to the client and has no
> > chance to affect them since it never sees any of those data streams.
>
> > Based on the description you provided, I suggest that GetImage.IMG add
> > a new "Copyright" parameter and add the overlay itself, and your
> > website will pass a string to GetImage.IMG to get it overlayed
> > whenever your website wants.
>
> > //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David.Wang
> > //- Hide quoted text -
>
> - Show quoted text -


In order for your Server-side code to intercept those GetImage.IMG
streams, your server has to make the request to GetImage.IMG itself
(i.e. you can't just pass the GetImage.IMG URL back to the client
because then the Client makes the request and your Server-side code
obviously cannot intercept that).

In short, it's possible, but you have to get the right interceptor for
the right stream. Right now, the HTML that your code returns to the
client will not allow you to intercept the stream. You will have to
modify that HTML according to the rules I just described.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
date: Tue, 22 Jul 2008 19:42:39 -0700 (PDT)   author:   David Wang

Re: Additional / Second Intercept for ISAPI Call   
Hi,

For anyone else with a similar interest see http://filterdotnet.blogspot.com/
which enables an ISAPI filter to do what is required.

 Crispin
date: Wed, 23 Jul 2008 01:24:10 -0700 (PDT)   author:   unknown

Google
 
Web ureader.com


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