How do I route images through ASP.NET routing?
I'd like to create a dynamic thumbnail resizer so that you can use the following URL to get a resized image: http://server/images/image.jpg?width=320&height=240 I tried setting up a route like this: routes.MapRoute(null, "{filename}", new { controller = "Image", action = "Resize" }); But if the file exists at the URL, ASP.NET will bypass the routing and return you just the file instead. How do I force ASP.NET to route the images instead of returning what's on disk? Thats how asp.net routing works, there is no away around that... you have to use Rewrite if you want to intercept requests for