我正在路由我的图像并通过 imageRouteHandler 调整它们的大小。这是代码。
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()
将写信给回复。这里还需要什么?