Problem mapping HttpHandler --> HTTP Error 404 Not Found
Posted
by JohnIdol
on Stack Overflow
See other posts from Stack Overflow
or by JohnIdol
Published on 2010-05-18T15:35:16Z
Indexed on
2010/05/20
17:00 UTC
Read the original article
Hit count: 367
I am having problems trying to map an HttpHandler in the web.config.
This is the relevant config bit:
<httpHandlers>
<add verb="*" path="*.hndlr" type="MyAssembly.MyHandler, MyAssembly" validate="false" />
</httpHandlers>
When I navigate to http://localhost/myApp/whatever.hndlr
I am getting a server error 404 (not found).
It's the 1st time I am hooking up an HttpHandler so I might be missing something - any help appreciated!
UPDATE:
I managed to get it working using both answers so far - who's able to exaplin why it works gets the answer marked!
This is my config (won't work if Don't have both - I am running IIS7 in classic mode)
System.web:
<httpHandlers>
<add verb="*" path="*MyHandler.hndlr" type="MyAssembly.MyAssemblyHandler, MyAssembly" validate="false"/>
</httpHandlers>
System.webserver:
<handlers>
<add name="MyHandler" verb="*" path="*MyHandler.hndlr" type="MyAssembly.MyAssemblyHandler, MyAssembly" validate="false"/>
</handlers>
© Stack Overflow or respective owner