HttpHandler Question

P

preport

So I wrote an HttpHandler that does a bunch of processing then writes a gif
to the HttpContext.

What I want to do is have my handler intercept any requests for *random.gif
How might I go about getting this to work? Of course my handler works
perfect on my dev machine....because I added this to the web.config:

<add verb="*" path="*random.gif" type="Assembly.Handler" />

So all the requests for normal images works, and *random.gif gets picked up
by my handler...But as soon as I put it on a test server it didn't work
(assuming it is because I have to add the ISAPI extention). As a result I
associated the gif extention to the aspnet_isapi, but then it executes on
all images (as I expected but tried anyways).

Hopefully I got my point across. Any suggestions on how to get my handler
to intercept *random.gif.
Paths can be anything from http://blabla.com/what/is/this/random.gif or
http://blabla.com/random.gif

Any suggestions would be appreciated.
 
B

Bruce Barker

you have to add .gif the to asp.net mapping map in IIS for your vdir. the
next major release of iis will allow this to be set in the web config.

-- bruce (sqlwork.com)
 
P

preport

That's not going to work in my situation.....because like I said it might be
in

http://blabla.com/what/is/this/random.gif or http://blabla.com/random.gif

Can I do the exact opposite...like register the handler everywhere EXCEPT my
/image/ folder?

Can I go into the images folder and do something in the ISAPI filters? Like
add the .gif extention to some arbitrary dll or static file handler or
something (yes...I think I did make half of that up......static file
handler????? hahaha)
 

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,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top