Set IHttpHandler for all files in a directory?

G

Guest

Hi;

I have tried both:
<add verb="*" path="html-image\*.jpg" type="BitmapView"/>
and
<add verb="*" path="html-image\*" type="BitmapView"/>
But neither works. In both cases I just get file cannot be found and it
never calls my code.

If I set
<add verb="*" path="html-image.*" type="BitmapView"/>
That works - but it is not what I need.

Any ideas?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
Q

q

In IIS, there is a wildcard application map. Do that on your virtual
directory. Then, you should be a step closer to what you want...
 
Q

q

Er... and if the file isn't real make sure you turn OFF file existence
verification in IIS for the mapping.
 
S

Steven Cheng[MSFT]

Hello Dave,

As for the httphandler configuration, as far as I knew, it supports limited
wildcard mapping format. So far based on my test, as long as you've
configured the IIS extension mapping to redirect the certain document
extension to ASP.NET isapi.dll, the following wildcard format httphandler
path is supported:

<add path="test.*" verb="*" type="PPTHandler, __code"/>

<add path="*.test" verb="*" type="PPTHandler, __code"/>

<add path="*asm.bsd" verb="*" type="PPTHandler, __code"></add>

<add path="asm*.bsd" verb="*" type="PPTHandler, __code"/>

As for the test path you provided, why did you put an "\" char in the path,
is it necessary for your application?


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

I have to return bitmaps that I have stored in a database. So my plan was
that the filenames woul be html-file\1234.jpg, html-file\1235.jpg, etc. The
html-file directory would say it's a bitmap in the database and then the file
name would be it's PK in the database.

Is there another way to do this? Because it looks like I can't use the
directory for the path. This is presently on the VS2005 integrated server but
it needs to work on IIS also.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
S

Steven Cheng[MSFT]

Hi Dave,

I would suggest you avoid using any particular characters (like the
backward slash ) in your custom httphandler's request url, you can use some
normal separaor char such as "-" to separate different part in your custom
handler's url and then parse them in your httphandler's code. e.g.

http://servername/appname/databasename-filename1.rpt

Also, directory path is not allowed as content in url path directly. The
correct way is to use them as a querystring parameter. I'm afraid there is
no other means for this so far.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top