I have this
&开发者_StackOverflow社区lt;add name="xxx" verb="GET,POST,PUT" path="xxx/*" type="...." />
Ie any url that looks like xxx/anything should go to that handler. Now that this is cohosted in an MVC app it no longer works. It seems that I need some derivative of
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
but I cannot work out the correct incantation
has to be
public class XXXRouteHandler : IRouteHandler
{
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
return new XxxHandler(); // the original http handler
}
}
and
var xxxroute = new Route("xxx/{*pathinfo}", new XXXRouteHAndler());
routes.Add(xxxroute);
in RegisterRoutes
Correction: better is
routes.IgnoreRoute("xxx/{*ignore}");
精彩评论