Skip to content

Instantly share code, notes, and snippets.

@hammett
Created April 10, 2012 23:29
Show Gist options
  • Save hammett/2355591 to your computer and use it in GitHub Desktop.
Save hammett/2355591 to your computer and use it in GitHub Desktop.
public class MsMvcHandler : Castle.MonoRail.Hosting.ComposableHandler
{
public override bool TryProcessRequest(HttpContextBase request)
{
var routeData = RouteTable.Routes.GetRouteData(request);
if (routeData != null)
{
var routeHandler = routeData.RouteHandler;
var requestContext = new RequestContext(request, routeData);
IHttpHandler httpHandler = routeHandler.GetHttpHandler(requestContext);
httpHandler.ProcessRequest(HttpContext.Current);
return true;
}
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment