From what I've read it is best not to use routing with an HttpHandler, but it is very easy to make it handle all requests for urls that start with a folder name like /myapp.
1. Use the configuration for extensionless urls as previously mentioned.
2. Create a class that implements IHttpHandler
Example I tested with:
/// Summary description for MyAppHandler
public class MyAppHandler : IHttpHandler
public void ProcessRequest(HttpContext context)
context.Response.ContentType = "text/plain";
context.Response.Write("You requested " + context.Request.Url.ToString());
public bool IsReusable
3. Add a handler mapping in Web.config in <system.webServer><handlers> like this:
<add name="MyAppHandler" verb="*" path="myapp/*" type="mojoPortal.Web.myapp.MyAppHandler, mojoPortal.Web" preCondition="integratedMode"/>
Note that if you are running in a sub directory you may need the subdirectory as part of the path, I'm testing with a root site running at loclahost bbut if you are running under loclahost/mojoportal or some other sub folder then you may need to make the path like mojoportal/myapp/*
Your type would be your namespace.yourclass, yourassembly, I tested directly in mojoPortal.Web but you would use your own custom project.
I can request any url like http://localhost/myapp/foo or http://localhost/myapp/foo.png or foo.aspx etc, and the handler always handles the request, in my example it just writes the requested url.
Hope that helps,