0
我正在路由我的圖像並通過imageRouteHandler調整它們的大小。 這是代碼。從RouteHandler中的WebImage返回已調整大小的圖像
public class ImageRouteHandler : IRouteHandler
{
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
var filePath="(from Request Context)"
var image = new WebImage(filePath);
image = image.Resize(width, height);
image.Write();
return null;
}
}
我收到此錯誤,
The route handler '...ImageRouteHandler' did not return an IHttpHandler from its GetHttpHandler() method.
的WebImage.Write()
將寫入響應,因爲我知道。這裏還需要什麼?