Why do all of my .axd files generate a 404 error when on our production server?
if you're on IIS7 make sure you add the handler to the <system.webServer><handlers>
section:
<add name="MyName" path="MyName.axd" verb="*" type="NameSpace.Class, Assembly" />
You can check the following:
<system.web><httpHandlers>
. For IIS7 Integrated mode it should be registered in <system.webServer><handlers>
.If this will help anyone, I had the same problem, few of us spent 2 days on. On 3 servers everything worked ok and allso on development but on this server 404 non stop. The solution, I changed poold from integrated to classic and that worked
In my case, I was transferring project from .NET 2.0 using automatic conversion. Converter added the <system.webServer>
section and all the handlers and modules that are in the <system.web>
. However, for each handler it added the following attribute: preCondition="integratedMode,runtimeVersionv2.0"
Once I removed the attribute the 404s stopped and handler started to work.
Can you make a "bad" request that fails and then check the server's system and application event logs?
There are several issues around axd that can cause 404s or 500s (such as the "time in the future" issue mentioned by Alex), but they leave a footprint in the event log.
Have a look and post any log entries that mention axds.
You need to create a MIME type for that extension in IIS:
To define a MIME type for a specific extension, follow these steps: