473,385 Members | 1,536 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,385 software developers and data experts.

Set IHttpHandler for all files in a directory?

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
Oct 2 '06 #1
6 1657
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...

David Thielen wrote:
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
Oct 3 '06 #2
q
Er... and if the file isn't real make sure you turn OFF file existence
verification in IIS for the mapping.

David Thielen wrote:
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
Oct 3 '06 #3
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.

Oct 3 '06 #4
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


"Steven Cheng[MSFT]" wrote:
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.

Oct 3 '06 #5
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.

Oct 9 '06 #6
ok - thanks

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

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


"Steven Cheng[MSFT]" wrote:
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.

Oct 9 '06 #7

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

Similar topics

1
by: lapin | last post by:
I'm trying to get access to session variables from an IHttpHandler class. In several places I've seen the solution posted as in this message: >If you define your own custom HttpHandler, you...
0
by: Chris Hughes | last post by:
I have implemented a HTTP handler (IHttpHandler) for HTTP PUTs, and have some concerns as to the security of the solution. My initial tests suggest that write and execute permissions must both...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
0
by: Shaike | last post by:
We are trying to develop a webdav server side componenet that runs under the context of the IIS. This component suppose to expose a logical structures that stored in a DB as webdav folders/files...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
1
by: David Thielen | last post by:
Hi; When I display reports, if it's a text file I need to have a .txt extension. This got me thinking, what would seem most natural to users is if the url ended up being something like:...
5
by: shapper | last post by:
Hello, In this moment I am creating all my aspx pages on my vb.code at runtime. It seems nonsense to have .aspx and .aspx.vb files in my projects. I am considering creating my pages on the...
1
by: Aartware | last post by:
I've read all the items about the IHttpHandler and the session-object and I see nothing wrong with my code, but still I have no session object. This is my code: Imports System Imports...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.