When my clean, just created new app (.net 4.0 integrated) is on Visual Studio Web Server everything works fine. Link like this below works fine and controller returns image.

```
http://localhost:12345/image/a.jpg

```

But when I run this app on IIS 7.5 then iis takes control and reports 404.

```
http://localhost/testmvc3/image/a.jpg

```

Controller:

```
public class ImageController : Controller
{
    public ActionResult Index(string name)
    {
        var dir = Server.MapPath("~/content/" + name);
        return File(dir, "image/jpg");
    }
}

```

Routes:

```
public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

    routes.MapRoute(
        "Image", // Route name
        "image/{*name}", // URL with parameters
        new { controller = "Image", action = "Index", name = UrlParameter.Optional } // Parameter defaults
    );

    routes.MapRoute(
        "Default", // Route name
        "{controller}/{action}/{id}", // URL with parameters
        new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
    );
}

```

What I should change to run this app properly?

EDIT1:  

The problem is with extension. When I remove extension then requests points to image controller. With extension (jpg) iis takes request first (why!?) and returns 404 (without touching image controller action).

EDIT2:

* IIS 7.5 on Windows 7 64bit
* App on Framework 4.0 integrated pipeline

web.config before my changes:

```
<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

```