We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

ISAPI problem with IIS 6.0  [Answered]RSS

12 replies

Last post Sep 10, 2008 09:53 AM by zdenek

  • ISAPI problem with IIS 6.0

    Aug 22, 2008 01:23 PM|elkvis|LINK

    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.

     

    Please Help.

  • Re: ISAPI problem with IIS 6.0

    Aug 22, 2008 01:46 PM|ma_khan|LINK

    Tried ADPlus or DebugDiag.... ??  

  • Re: ISAPI problem with IIS 6.0

    Aug 22, 2008 01:58 PM|elkvis|LINK

     I've never heard of those, and they didn't come up in any of my searches.

     what are they, what do they do, are they free, and where can I get them?

  • Re: ISAPI problem with IIS 6.0

    Aug 22, 2008 02:00 PM|ma_khan|LINK

    Check this  

  • Re: ISAPI problem with IIS 6.0

    Aug 22, 2008 03:01 PM|elkvis|LINK

     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.

  • Re: ISAPI problem with IIS 6.0

    Aug 22, 2008 04:16 PM|ma_khan|LINK

    Do you have anything in the HTTPErr logs related to this issue? you must also get something in the event logs ... ntdll is a windows dll... so even I am not of much help there :)

     Just curious is your module an ISAPI extension or an ISAPI filter??

  • Re: ISAPI problem with IIS 6.0

    Aug 22, 2008 04:32 PM|elkvis|LINK

     This is an extension.  it will eventually function the same way as a CGI exe.

     

    the latest relevant entry in the HTTPERR log file reads as follows:

    2008-08-22 18:59:15 10.2.1.199 7766 10.2.1.240 80 HTTP/1.1 GET /team_isapi/isapi_test.dll - 2073976507 Connection_Abandoned_By_AppPool DefaultAppPool

     

    does this help?

  • Re: ISAPI problem with IIS 6.0

    Aug 22, 2008 06:10 PM|ma_khan|LINK

     Well all I  can confirm with that is your AppPool is crashing for sure... :(

    Don't think your request is even reaching the IIS...

  • Re: ISAPI problem with IIS 6.0

    Aug 24, 2008 10:22 AM|elkvis|LINK

    ma_khan

     Well all I  can confirm with that is your AppPool is crashing for sure... :(

    Don't think your request is even reaching the IIS...

     

    Is there anything I can do about this?  I can't reinstall IIS on this machine because it handles mission-critical tasks and can't afford the downtime.

  • Re: ISAPI problem with IIS 6.0

    Aug 24, 2008 12:11 PM|ma_khan|LINK

    Are you trying all this on a production box????

     Anyways you may want to try this on a dev IIS machine once .. just to check if everything is fine with your dll...

    Do you have any error code that is being shown in the dumps???  

  • Re: ISAPI problem with IIS 6.0

    Aug 24, 2008 04:27 PM|elkvis|LINK

     I'm doing this on a production box because the boss is too cheap to buy me a dev machine.

     the error message is as follows:

     In w3wp__PID__5680__Date__08_22_2008__Time_01_33_36PM__414__Second_Chance_Exception_C0000005.dmp the assembly instruction at ntdll!RtlEqualSid+10 in C:\WINDOWS\system32\ntdll.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x392a3117 on thread 9

    hope this helps.

  • Re: ISAPI problem with IIS 6.0

    Aug 25, 2008 05:51 AM|ma_khan|LINK

    Access Violation for ntdll... hmm... anything else that looks abnormal in the stack ??

     if nothing works ... try MS support for Debug assisstance...

  • Re: ISAPI problem with IIS 6.0

    Sep 10, 2008 09:53 AM|zdenek|LINK

    Can you post the whole stack trace? Usually getting access violation in system DLLs are caused by call that passes invalid value. The system does not check, rather it exceptions out. It is done for high performance where you optimize for 99.99% of the case by not checking values. This error could very well be caused by pointer to released memory being passed, for example, as null terminated string to a system call. The system dll will then proceed with the call as if it was valid thus reading the unallocated memory and causing access violation that is back propagated to your code.