Is there anybody out there who is familiar with using CGI’s implemented as DLLs under IIS? We have some programs on our IIS4 server that I am trying to migrate to an IIS5 Server (Windows 2000). But when I try to use them, I get errors. One of them returns a HTTP 405 error (which IIS shows as “Resource not allowed”, but the standard for a 405 is “Method not allowed”). The other one just says “A dynamic link library (DLL) initialization routine failed.” There is nothing in the Event Log related to either of these errors.
There are other utility DLLs used by these programs. I’ve installed those under the System32 directory and given the IUSR and IWAM accounts Read and Execute permissions on them. I’ve also made sure that the web directories holding the programs have “Scripts and Executables” permissions in the IIS MMC.
What could I be missing, or how can I find out more details about the errors? Is there some way that I can do some sort of trace on the DLLs being executed by IIS to see what’s really causing the problem? Maybe something akin to strace on Linux or ptrace on FreeBSD?
On some servers running W2K and IIS5, I’ve had to set the protection for DLL (ISAPI) execution to LOW, just because. It appears a version of this problem is known to Microsoft, but in another form. However, this may not fix your problem. My symptoms were somewhat different. But it’s one of those things that you might not think to try…
As it turns out, I fixed this problem some time ago. I eventually found out that the permissions on some registry entries needed by the ISAPI weren’t set correctly. In particular, I had given “Read” permission, but for some reason, it demanded “Full Control” permission. Even though the app never needs to write to those entries.