Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AsyncMvcRouteHandler : IRouteHandler
- {
- public IHttpHandler GetHttpHandler(RequestContext requestContext)
- {
- return new AsyncMvcHandler(requestContext);
- }
- class AsyncMvcHandler : IHttpAsyncHandler, IRequiresSessionState
- {
- public AsyncMvcHandler(RequestContext context)
- {
- }
- // IHttpHandler members
- public bool IsReusable { get { return false; } }
- public void ProcessRequest(HttpContext httpContext) { throw new NotImplementedException(); }
- // IHttpAsyncHandler members
- public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData)
- {
- throw new NotImplementedException();
- }
- public void EndProcessRequest(IAsyncResult result)
- {
- throw new NotImplementedException();
- }
- }
- }
- routes.Add(new Route("{controller}/{action}/{id}", new AsyncMvcRouteHandler())
- {
- Defaults = new RouteValueDictionary(new { controller = "Home", action = "Index", id = "" }),
- });
- }
- routes.MapRoute(
- "Default",
- "{controller}/{action}",
- new { controller = "Home", action = "Index" }
- );
Add Comment
Please, Sign In to add comment