1

Because a special reason we want to append some headers and set the cache to "NoCache" to all responses of our application. The problem is, that all the responses of the static files (images, css, js,...) should not be modified. So the question is: Are this files also handled by the Global.asax? A first try with the default settings did not call the Application_BeginRequest. Are there any settings we have to be aware of because they will change this behavior?

@edit: we are using IIS 7 with asp.net 2.0

Dominik Kirschenhofer
  • 1,205
  • 1
  • 13
  • 27
  • It depends - which IIS are you using ? – Ondrej Svejdar Jun 12 '13 at 08:19
  • I believe this will help you: http://stackoverflow.com/questions/9522348/add-custom-header-based-on-file-type – Alexander Jun 12 '13 at 08:20
  • 1
    In IIS7 it depends, if application pool is configured to be integrated or classic. Classic serves static content trough ISAPI filter, so BeginRequest is not being hit. Integrated routes static files through .NET managed handler, so BeginRequest will be hit. – Ondrej Svejdar Jun 12 '13 at 08:58
  • Thank you, we are using "classic"! And is there anything else? As I have seen there is this "StaticFile" handler. Is it possible that, for any reason, there is an other handler for image files and so Global.asax will be used? – Dominik Kirschenhofer Jun 12 '13 at 11:05

0 Answers0