Peter
Peter

Reputation: 38565

IIS 6 Http Handler with no predefined file extension

Well i have a http handler that is set up like this

<add name="DocumentHandler" verb="*" path="/LinkDocumentHandler/*" type="MyTestProject.LinkDocumentHandler, MyTestProject" />

(Remove name in IIS 6 and move it to the right section)

This works great in my VS webserver all requests that are going to the directory LinkDocumentHandler are handled by the handler..

Now when i come to IIS 6.0 this did not work so i googled a bit and found out that i have to define what file types IIS 6.0 will pass to asp.net well i can't predict all of them so that would not be so nice..

I tried to change /LinkDocumentHandler/* to /LinkDocumentHandler.aspx/* but that did not help..

So is there any way to force IIS 6.0 to pass all file requests with that sub dir to my http handler??

Upvotes: 2

Views: 1993

Answers (2)

Peter
Peter

Reputation: 38565

In IIS I added a Wildcard and unchecked "check if file exists" and it just worked (used the same dll that .aspx uses)!

Upvotes: 1

CodingGorilla
CodingGorilla

Reputation: 19872

This is very difficult to do in IIS 6, what you really need to do for this is write an ISAPI filter. Beyond that, IIS mappings are pretty much controlled by the file extension so it's very difficult to get it to pass all requests to asp.net.

There's a similar discussion here, where it appears the OP might have found a "partial" solution.

Upvotes: 0

Related Questions