ARACK04
asked on
IHttpModule not getting called
Put simply, is there any reason why an IHttpModule would not get called for requests for script files? My module is set to gzip compress all JSON responses, and also all script files. It works perfectly locally, but when I deploy it to my shared hosting account, it **only works for the JSON responses**.
Is there some IIS setting that they might have to cause requests for these files to bypass my HttpModule somehow?
Thanks!
Is there some IIS setting that they might have to cause requests for these files to bypass my HttpModule somehow?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This window in IIS controls what file extensions map to what, you can add to these as you wish.
IIS.gif
IIS.gif
ASKER
Genius, thanks!
Why did it work in localhost though? Are requests through localhost not capable of knowing what's static, and just send everything through the ASP.NET runtime?
Why did it work in localhost though? Are requests through localhost not capable of knowing what's static, and just send everything through the ASP.NET runtime?
ASKER
Instead of .js.aspx, couldn't I just add .js to the extensions handled by .NET directly? Also, if I did that, would it still work for requests with a querystring added on, like
foo.js?ver=1.6
I would assume so since requests like that still work for .aspx files.
Thanks for putting up with this simple (probably stupid) question!
foo.js?ver=1.6
I would assume so since requests like that still work for .aspx files.
Thanks for putting up with this simple (probably stupid) question!
It works on localhost because the development server in visual studio routes all traffic through the runtime.
You could indeed map .js to asp.net and handle them there.
You could indeed map .js to asp.net and handle them there.
ASKER
Open in new window