473,387 Members | 1,590 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,387 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 1310
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

2
by: Hanse Davion | last post by:
Can anyone provide some insight on what this problem could be? I have searched the web, read forums, and all the installation documentation for the dotnetnuke feeware portal from asp.net. I am...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.