.axd files generate a 404 error

后端 未结 9 2142
无人共我
无人共我 2020-12-31 08:32

Why do all of my .axd files generate a 404 error when on our production server?

相关标签:
9条回答
  • 2020-12-31 09:18

    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.

    0 讨论(0)
  • 2020-12-31 09:19

    I added a attribute runAllManagedModulesForAllRequests="true" into modules.. node of the system.webServer section, the 404s stopped and handler started to work.

    0 讨论(0)
  • 2020-12-31 09:20

    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>
    
    0 讨论(0)
提交回复
热议问题