I created an HttpHandler in a class library project and directly inheriting from IHttpHandler. Added the "add" element into web.config and put the assembly for the handler into the bin folder. When I navigate to handler path Umbraco returns me the ugly(!) not found page. The handler works fine under a normal web site.
you need to register your path or page (handler) in the web.config file under appSettings-> umbracoReservedUrls or umbracoReservedPath. Check out the pre defined values you shold get it done then :)
I copy the assembly into the bin folder of umbraco. I add <add verb="*" path="MyHandler.axd" type="MyAssembly.MyHandler, MyAssembly" /> to the web.config (Assembly name and the namespace is same in my case).
I add ",/MyHandler.axd" to the umbracoReservedUrls setting.
I am also trying to implement a custom httphandler and having no fun getting it to work. I have a stand-alone web site on the same computer in which the handler works, but when I added it to Umbraco, no dice. It looks like this:
Added to httpHandlers web.config section:
Added to appSettings:
The result is the asp default 404 not found page (not the umbraco-generated version). I think this is a little different because it's mapping an ASPX extension. I also added some mappings for the ASHX extension that are working just fine - just not the ASPX mapping. Any advice on how to resolve this would be appreciated.
Follow-up: I got this work by upgrading to Umbraco 6 and adding the httpHandlers to the <handlers> section.
How to register custom HttpHandler
I created an HttpHandler in a class library project and directly inheriting from IHttpHandler. Added the "add" element into web.config and put the assembly for the handler into the bin folder. When I navigate to handler path Umbraco returns me the ugly(!) not found page. The handler works fine under a normal web site.
Any ideas?
Also same thing happens for a custom aspx page.
Hi,
you need to register your path or page (handler) in the web.config file under appSettings-> umbracoReservedUrls or umbracoReservedPath. Check out the pre defined values you shold get it done then :)
Cheers
Hi Tobias,
I think I acted a bit early :)
This is what I do:
I copy the assembly into the bin folder of umbraco. I add <add verb="*" path="MyHandler.axd" type="MyAssembly.MyHandler, MyAssembly" /> to the web.config (Assembly name and the namespace is same in my case).
I add ",/MyHandler.axd" to the umbracoReservedUrls setting.
Now when I navigate to http://localhost/myhandler.axd I see the 404 page of IIS (not umbraco).
Thanks for your help.
Hi,
pleas try to rename the handler file to MyHandler.aspx in the reservedUrl and the handler declaration and try again.
If that works your IIS has the .axd Files not registered.
Hi Tobias,
Yes figured it out. axd is not registered, it works with the aspx extension.
Thank you.
I am also trying to implement a custom httphandler and having no fun getting it to work. I have a stand-alone web site on the same computer in which the handler works, but when I added it to Umbraco, no dice. It looks like this:
Added to httpHandlers web.config section:
is working on a reply...