0
我有一個IRouteHander類,我用它來動態調整圖像大小併爲其添加過期標題,最近我轉移到MVC5,現在更新我的代碼。我試圖註冊在RouteConfig.csIRouteHandler沒有通過RouteConfig路由
routes.Add(new Route("Image/{w}/{h}/{src}", new ThumbImageRouteHandler()));
該類相同的路線,但是這條線路不工作了,就像是在MVC3和MVC5給予404錯誤。有什麼我在這裏失蹤?此路線導致
public class ThumbImageRouteHandler : IRouteHandler
{
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
HttpHanler httpHandler = new HttpHanler();
return httpHandler;
}
public class HttpHanler : IHttpHandler
{
public bool IsReusable
{
get
{
return false;
}
}
public void ProcessRequest(HttpContext context)
{
//Do something
}
}
}
}
請幫我解決這個問題。謝謝