iroutehandler

How to Make ASP.NET MVC Recognize IHttpAsyncHandler from IRouteHandler.GetHttpHandler() ?

In this question & answer, I found one way to make ASP.NET MVC support asynchronous processing. However, I cannot make it work. Basically, the idea is to create a new implementation of IRouteHandler which has only one method GetHttpHandler. The GetHttpHandler method should return a IHttpAsyncHandler implementation instead of just IHttpH...

How to use IRouteHandler to invoke a WCF REST service

Has anybody managed to make an IRouteHandler to invoke a WCF REST Service. I can't find the appropriate IHttpHandler to return in the IRouteHandler implementation. I want to try routing as opposed to url-rewriting to see if I can get the required RESTful URIs in cassini as well as IIS6+. Thanks, Steve ...

IRouteHandler in Web Forms: Routing requests that require HttpContext.User

I'm trying to add a pretty basic route to an Asp.Net Web Forms app (running under IIS 7, integrated mode): for requests coming to http://mydomain.com/foo/ I would like to show the results of a dynamic page (http://mydomain.com/foopage.aspx). I've created a RouteHandler that does all this and it seems to be routing correctly. public...

ASP.NET MVC 2.0 + Implementation of a IRouteHandler does not fire

Can anybody please help me with this as I have no idea why public IHttpHandler GetHttpHandler(RequestContext requestContext) is not executing. In my Global.asax.cs I have public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}....

Session is null in IRouteHandler.GetHttpHandler with Asp.net routing

Hi, I'm trying to get Session enabled in the GettHttpHandler method of my IRouteHandler classes but session is always null. Could someone tell me what I'm doing wrong? In global.asax I have RouteTable.Routes.Add("All", new Route("{*page}", new MyRouteHandler())); The MyRouteHandler class where Session is null looks like this: publi...

Protecting images in ASP.NET MVC (w/ custom RouteHandler)

I created a custom RouteHandler for images that I want protected. My RouteHandler simply takes a new route (graphics/{filename}) and does a lookup for the true file path, sets the mime type, and serves it up. That works fine. (http://www.mikesdotnetting.com/Article/126/ASP.NET-MVC-Prevent-Image-Leeching-with-a-Custom-RouteHandler) Wh...