-
Notifications
You must be signed in to change notification settings - Fork 11
MvcIntegration
gimmi edited this page Mar 22, 2012
·
2 revisions
ExtDirectHandler is implemented as a single System.Web.HttpHandler, so it should work with ASP.NET MVC without problems, you just have to inform MVC routing mechanism to ignore Ext Direct requests.
For example, if ExtDirectHandler has been configured for handling requests from "/rpc" address, add the following routing configuration in your Global.asax:
routes.IgnoreRoute("rpc/{*pathInfo}");
- Create class:
public class DirectRouteHandler : IRouteHandler { public IHttpHandler GetHttpHandler(RequestContext requestContext) { return new ExtDirectHandler.DirectHttpHandler(); } }
- Add following to the RegisterRoutes function in Global.asax.cs:
routes.Add(new Route("rpc/{*pathInfo}", new DirectRouteHandler()));
- No
<httpHandlers>
androutes.IgnoreRoute("rpc/{*pathInfo}")
are required anymore.