0

I want to have custom validation of PostRewrite to only allow the owner of the image to request bigger images but when I try to validate the User is always null.

Is there any way that I can get the current user from the Imageresizing pipeline ?

rjlopes
  • 2,430
  • 4
  • 21
  • 23

1 Answers1

0

Your server is configured to only run the FormsAuthenticationModule for certain request extensions, such as .aspx, .ashx, etc. There are two ways to solve this.

  1. Remove and re-add the FormsAuthenticationModule in <system.webServer> <modules> (For Integrated Mode), dropping the precondition="managedHandler" attribute:
  2. Enable RAMMFAR (runAllManagedModulesForAllRequests)

This post contains more details about implementing #1 and #2:

How do I protect static files with ASP.NET form authentication on IIS 7.5?

Community
  • 1
  • 1
Lilith River
  • 16,204
  • 2
  • 44
  • 76