httphandler for a specific folder

N

Ned White

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
 
K

Kalpesh

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
 
M

Madhur

You can have a specific web.config for each virtual folder. web.config
inherits settings from parent web.config.

Hope this helps.
 
G

George Ter-Saakov

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top