I have an ISAPI dll that I wrote, and all it is designed to do at the moment is to display a message on the page, but I get a "connection reset" message from my web browser when I try to load the dll. in the dll, I have added some logging so that it tries to log its activity to a file. the file is not even getting created, so I suspect that the dll is not getting loaded at all. I have tried explicitly creating an extension in IIS for my DLL, and I have also tried enabling all unknown ISAPI extensions, and both have the same result. I have tested my DLL with an ISAPI debugger program, which loads the dll, gives it a request, and shows the result. with the debugger it works fine, but in IIS it appears to cause DefaultAppPool to crash. in the log files, the lines representing requests to this DLL end with "500 0 14001" which means there is some internal server error going on, but I have no idea how to find out what the error is or what is causing it. I have searched for about 2 hours now for a solution to this problem with no luck.
I tried a program (DebugDiag) suggested by a poster on the IIS board, and the dump report says it crashed in a call to RtlEqualSid in ntdll.dll. This is not a function that I am calling, so I have no clue what to do with this information. I tried immediately returning from the HttpExtensionProc function with no effect, so I'm guessing the problem is coming from the attempt to load the DLL and attach it to the process or thread. I also tried immediately returning from the DllMain function, but that had no effect either. I'm really at a loss as to why this is happening.