New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StaticFileHandler no longer assigned when VirtualPathProvider has existing file #140

Closed
lilith opened this Issue May 12, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@lilith
Member

lilith commented May 12, 2015

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>

@lilith lilith closed this in 1e397ae May 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment