Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

httphandler for a specific folder

0 views
Skip to first unread message

Ned White

unread,
May 15, 2008, 6:21:01 PM5/15/08
to
Hi All,
I would like to create a httphandler to set text watermark on image files
before it gets displayed to the user.
But this handler must listen specific folder or virtual directory(on same
IIS) not all the image files in the web application, for example it should
work for only "/Images/Products" folder and all its subfolders. Or
"Products" virtual directory and all subfolders.

Is there a way to do this ?

Thanks in advance for suggestions.

Ned


Kalpesh

unread,
May 15, 2008, 6:46:43 PM5/15/08
to
httpHandler section in web.config could help.
It has a path property, which could be used to specify handler for
specific path.

I am just guessing it based on the docs.
Experts can help.

Kalpesh

George Ter-Saakov

unread,
May 16, 2008, 10:54:01 AM5/16/08
to
Problem is that images do not go through .NET thus your handler will not be
called if browser requests /Images/Products/myimaje.jpg

The best way is to have it in your html like
<img src="myhandler.asmx?image=myimage.jpg">
And handler will get the image, sign it and return to the user.

George.


"Ned White" <nedwhite@> wrote in message
news:eRFYdott...@TK2MSFTNGP06.phx.gbl...

0 new messages