C++ ISAPI DLL - hangs and sometimes returning Server
Error , suddenly..
From one of our web pages , we post data to a c++
Response.Redirect "<our ISAPI DLL>.dll" & "?" & sData ..

This works fine most of the days . but sometimes the
redirect hangs and we also get server error as reponse.
I tried to rename the dll , I was successful . By I am not
able to delete the dll .. I get Access Denied.. file may
be in use..
Also I copied copy of same dll and with diffrent name to
the location and modified my asp to call this new named
dll , it worked. It seems to be problem with that
particular dll instance , which always hangs.. Any help or
reference is highly appreciated..
thanks
Ramesh

Re: C++ ISAPI DLL - hangs and sometimes returning Server Error , suddenly.. by David

David
Thu Dec 18 12:22:43 CST 2003

My recommendation is that you fix the code inside the ISAPI since it's the
one that is causing the hang.

1. Your hanging problem is likely caused by the logic stored within the DLL
itself. All copies/instances of the DLL are broken; there isn't anything
special with renaming/copying the DLL that "fixes" the problem. It's a
matter of time before the new DLL (which is a copy of the old DLL and has
the same broken logic) will also hang given the same set of inputs that
trigger the inherent logic flaw within the DLL.
2. You cannot delete a file which has a handle open to it (this handle is
the means by which processes can locate this DLL if it needs information
from it). The DLL is loaded by at least one process started by IIS (since
you made a request to it via an ASP page, IIS is obligated to load and run
this DLL given proper configuration). You need to remove this open handle,
either by waiting for code inside the process to release the handle (may or
may not happen), or abortively killing the process that has the open handle
(and cause Windows to clean up the handles). Tools like Process Explorer
from www.SysInternals.com allow you to search for these process/handle
relationships. Be weary of killing processes, though -- each process is
doing something on your machine and may be shared by other services that are
running. When you kill the process to release the file handle, you may also
kill those other services and possibly get your server in a strange state
that requires a reboot to resolve. In general, randomly killing processes
is a recipe for disaster.
3. You are not POSTing data to your ISAPI DLL. Response.Redirect results
in a 302 response to be sent to the browser, which by definition does not
contain the POSTed entity body anywhere. I am guessing that your ASP code
is moving the POSTed form entity body into the querystring of the 302
redirect response, which is preserved on the redirect and allows you to pass
data around (though the client will visibly see it in their URL Location bar
as well).

I have no idea what code is written in the ISAPI nor what it is doing, so I
cannot suggest anything else. But, what is clear is that the ISAPI DLL has
at least one logic bug that needs to be fixed. If you cannot fix the ISAPI
DLL, then you will have to live with the hanging behavior. If you cannot
live with the hanging behavior nor fix the ISAPI DLL, then you need to find
another solution, based on what you need to do.

Personally, an ASP page can do many of the things that an ISAPI DLL can do,
so you may not need the ISAPI DLL at all.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Ramesh Gopalan" <ramesh_gopalan@countrywide.com> wrote in message
news:012201c3c501$dd42fd60$a401280a@phx.gbl...
C++ ISAPI DLL - hangs and sometimes returning Server
Error , suddenly..
From one of our web pages , we post data to a c++
Response.Redirect "<our ISAPI DLL>.dll" & "?" & sData ..

This works fine most of the days . but sometimes the
redirect hangs and we also get server error as reponse.
I tried to rename the dll , I was successful . By I am not
able to delete the dll .. I get Access Denied.. file may
be in use..
Also I copied copy of same dll and with diffrent name to
the location and modified my asp to call this new named
dll , it worked. It seems to be problem with that
particular dll instance , which always hangs.. Any help or
reference is highly appreciated..
thanks
Ramesh



Re: C++ ISAPI DLL - hangs and sometimes returning Server Error , suddenly.. by Dev

Dev
Thu Dec 18 15:02:40 CST 2003


Ramesh,

If your server is crashing or hanging you might want to
download our ReJuvin8 tool. It's free for the first
15-days. It can keep your site running despite problems.

It's designed to detect problems then restart or reboot.
It can restart ANY programs, services, or processes in
precise order. It doesn't fix bugs but it does give you some
breathing room while you are finding them. ReJuvin8 also
gives you email and telephone alert messages and graphic
status reports.

It can also test, alert, and report on URLs running anywhere
on any server on your net connection. So if you use multiple
servers you can use them to watch each other, too.

ReJuvin8 has both an automatic and a custom mode. In the
auto mode you make all the settings by pointing and
clicking. This will handle most applications.

The custom mode uses heartbeat synch files to get absolute
detection that key processes are working. Tools and
instructions are provided to help you do this. We also offer
customization as a contract service.

Charles


Get ReJuvin8 at: http://www.rejuvin8.net?ac=ch1


"Ramesh Gopalan" <ramesh_gopalan@countrywide.com> wrote in message
news:012201c3c501$dd42fd60$a401280a@phx.gbl...
> C++ ISAPI DLL - hangs and sometimes returning Server
> Error , suddenly..
> From one of our web pages , we post data to a c++
> Response.Redirect "<our ISAPI DLL>.dll" & "?" & sData ..
>
> This works fine most of the days . but sometimes the
> redirect hangs and we also get server error as reponse.
> I tried to rename the dll , I was successful . By I am not
> able to delete the dll .. I get Access Denied.. file may
> be in use..
> Also I copied copy of same dll and with diffrent name to
> the location and modified my asp to call this new named
> dll , it worked. It seems to be problem with that
> particular dll instance , which always hangs.. Any help or
> reference is highly appreciated..
> thanks
> Ramesh