473,322 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

httphandler for a specific folder

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
Jun 27 '08 #1
3 3351
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

On May 15, 3:21 pm, "Ned White" <nedwhite@wrote:
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
Jun 27 '08 #2
You can have a specific web.config for each virtual folder. web.config
inherits settings from parent web.config.

Hope this helps.

--
Madhur

"Ned White" <nedwhite@wrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
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

Jun 27 '08 #3
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:eR**************@TK2MSFTNGP06.phx.gbl...
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


Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John | last post by:
Hi All, We have a web application that runs well on Windows 2000 with IIS 5.1 and ..Net framework 1.1. We just moved it to .Net Server 2003. Suddenly we are having big problems!! The...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
2
by: Ken Yee | last post by:
First a little background: I've written an httphandler to handle wildcard extensions (i.e., I want to handle all URLs that come in rather than just URLs w/ a specific file extension so I can give...
3
by: Michael Schwarz | last post by:
Hi, I have a own HttpHandler running and configured like this in my web.config: <add verb="*" path="subfolder/*.ashx" type="Class,Assembly"/> Now, when turning cookieless Sessions on my...
4
by: Anbu | last post by:
Hi All, I'm implementing a soapreceiver class in a web site. The required httpHandler tag was also added in the web.config as below. <httpHandlers> <add verb="*" path="Receiver.ashx"...
0
by: Anbu | last post by:
Hi All, I'm implementing a soapreceiver class in a web site. The required httpHandler tag was also added in the web.config as below. <httpHandlers> <add verb="*" path="Receiver.ashx"...
2
by: wickedHangover | last post by:
I'm writing some code to act as a proof of concept which at this point works ok, there is a minor issue I would like to resolve. What I have is an image database being served in an academic...
3
by: Ned White | last post by:
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...
5
by: Author | last post by:
I followed the example at http://support.microsoft.com/kb/308001/EN-US/ and created my own HttpHandler. Here is the code: using System.Web; namespace MyNameSpace { public class...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.