Skip to content

StaticFileHandler no longer assigned when VirtualPathProvider has existing file #140

@lilith

Description

@lilith

In .NET 4.0, simply exposing a resource via a StaticFileHandler does not enable it to be served. This undocumented change causes 'unmodified' files from being retrieved via an ImageResizer provider.

The workaround is to specify StaticFileHandler for those requests, a la

<system.webServer>
<handlers>
  <add name="StaticGifImages" path="*.gif" verb="*" type="System.Web.StaticFileHandler" />
  <add name="StaticPngImages" path="*.png" verb="*" type="System.Web.StaticFileHandler" />
  <add name="StaticJpgImages" path="*.jpg" verb="*" type="System.Web.StaticFileHandler" />
</handlers>
</system.webServer>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions