Why do all of my .axd files generate a 404 error when on our production server?
We had error 500(it is not 404, but who knows) on our production server some time ago. No script resources were able to load.
The problem was in the time difference between our development and production servers. It was -7 hours. .NET threw an exception because of it tried to use a "time in the future" of an assembly with embedded script resources.
Decreasing {website}/bin/
folder (actually assemblies' in it) creation date by day solved the problem.
I added a attribute runAllManagedModulesForAllRequests="true" into modules.. node of the system.webServer section, the 404s stopped and handler started to work.
Confirm that in Request Filtering
you either
* have .axd
as an Allowed extension, or
* have Allow unlisted file name extensions
ticked in Edit Request Filtering Settings
The same effect can be achieved with the following web.config section:
<system.webServer>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".axd" allowed="true" />
</fileExtensions>
</requestFiltering>
</security>
</system.webServer>