IHttpHandlerFactory registration

A

AndyE

ASP.Net experts :

Fairly new to ASP.net, and I'm struggling to register a custom handler
in the <httpHandlers> section of my application WebConfig file. At
runtime I persistently get the 404 not found error.

The syntax I'm using is :

<httpHandlers>
<add verb="GET"
path="Pooled.calc"
type="PooledHandlerFactory.PooledCalcFactory,
CustomCalcHandler" />
</httpHandlers>

"Pooled.Calc" is the URL requested from the calling web page

I have an C# IHttpHandlerFactory implementation named
"PooledCalcFactory" in a "PooledHandlerFactory" namespace. My assembly
dll is named "CustomCalcHandler"

I also noticed that if I comment out the registration entries for
IHttpHandler classes in the Web.config file, then I can't subsequently
re-register them (requests untended for these class result in the 404
error, wheras they were working prior to being commented out)

I've registered *.calc with IIS for the virtual directory in question,
and mapped it to the framework "aspnet_isapi.dll"

I'm using VS.net ver 7.0.9446
Framework ver 1.0.3705

Any pointers on where I'm going wrong ?

Many Thanks

Andrew Eastwell
 
B

Brock Allen

Restart IIS.

I've never needed to do this to register custom extensions in IIS.
And remove the *.calc association with aspnet_isapi.dll in IIS. Let
the framework handle it directly.

I'm not sure how this is going to help. IIS won't know how to handle the
..calc request. Which framework were you thinking of?
Fairly new to ASP.net, and I'm struggling to register a custom handler
in the <httpHandlers> section of my application WebConfig file. At
runtime I persistently get the 404 not found error.

Which 404 page are you getting? Is it the default IIS 404 page or the ASP.NET
404 page? This tells you if the ISAPI is handling the request. Oh! This makes
me think that maybe you have the "Check that file exists" in your .calc ISAPI
registration. Make sure that the checkbox is not checked.
I've registered *.calc with IIS for the virtual directory in question,
and mapped it to the framework "aspnet_isapi.dll"

Make sure that you've mapped the correct ISAPI version if you have more than
one version of ASP.NET installed.
 
A

AndyE

Brock

Thanks - the problem was that "Check that file exists" in the .calc
ISAPI registration was ticked - I suppose this makes sense, given that
none of my URL extensions resolved onto physical files.

Thanks !
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top