ISAPI Extension gives 404 on IIS7

user85569 picture user85569 · Aug 16, 2011 · Viewed 8.8k times · Source

I'm running windows 7 64-bit and trying to load an ISAPI Extension I'm busy writing on my local IIS7 machine.

  • I added the location to the DLL under "ISAPI and CGI Restrictions"
  • I made the application pool recognize 32-bit applications (Extension is written in Delphi)
  • I made sure "Everyone" has full permissions on the directory/dll
  • I made sure to "Allow" ISAPI-dll in the "Handler Mappings" section and set it to "Read/Script/Execute" permissions

I still get 404.0 error in IIS7

I have checked that my MIME Mapping's is setup to handle *.dll and I have a perfectly working ISAPI-extension running on a different site on the same machine.

I even took this ISAPI-extension that gives me the 404 and put it in the root of the working website (where the other DLL is) and re-mapped the "ISAPI and CGI Restrictions" to it. Still gives me 404.0, even though I can literally run the other DLL at the same time or directly afterward and it's fine.

Any idea WTF is going on?!

Answer

user85569 picture user85569 · Aug 17, 2011

It turns out when you receive a 404.0 file not found error when you've setup everything else to work correctly, it means thats the ISAPI extension you're using is referencing (ie, including) another DLL as well. Without that DLL, it will 404.0

Also, if you've forgotten to "allow" a specific ISAPI DLL (even though ISAPI/CGI is allowed to execute) the error message you'll get is 404.2 :)