I have an ISAPI DLL that I wrote. I have "Cache ISAPI Extensions"
enabled for my web-site. IIS calls my TerminateExtension function
without the HSE_TERM_ADVISORY_UNLOAD flag, which means it is about to
unload my ISAPI DLL -- and I don't have the option to stop it.

Anyway to force IIS to keep it loaded? My ISAPI creates a listner
thread that accepts incoming connections, and those connections need
to be kept all the time (the ISAPI DLL uses them to service
requests). Plus, for other performance reasons I just want it to stay
loaded all of the time. I know I could move some code to a seperate
process, but that has plenty of downsides also.

IIS is version 6.0, Windows server 2003, and I've got windows update
enabled so I imagine I at least have any crucial updates.

Re: Tell IIS to never force ISAPI to unload? by David

David
Mon May 05 22:25:33 CDT 2008

With Cache ISAPI Extensions enabled, the only time IIS is going to
TerminateExtension is if the worker process is terminating due to
application pool health policy reason, and that cannot be stopped. By
default, there are several health policies that will result in
frequent TerminateExtension calls.

So, it sounds like you want to configure the Application Pool used for
your ISAPI DLL to *never* recycle under any circumstance, thus keeping
your ISAPI DLL loaded in memory after the first request that triggers
your ISAPI DLL to load.

There is no way for an ISAPI to "Force" IIS to do or not do anything.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//







On May 5, 2:16=A0pm, eselk2...@gmail.com wrote:
> I have an ISAPI DLL that I wrote. =A0I have "Cache ISAPI Extensions"
> enabled for my web-site. =A0IIS calls my TerminateExtension function
> without the HSE_TERM_ADVISORY_UNLOAD flag, which means it is about to
> unload my ISAPI DLL -- and I don't have the option to stop it.
>
> Anyway to force IIS to keep it loaded? =A0My ISAPI creates a listner
> thread that accepts incoming connections, and those connections need
> to be kept all the time (the ISAPI DLL uses them to service
> requests). =A0Plus, for other performance reasons I just want it to stay
> loaded all of the time. =A0I know I could move some code to a seperate
> process, but that has plenty of downsides also.
>
> IIS is version 6.0, Windows server 2003, and I've got windows update
> enabled so I imagine I at least have any crucial updates.


Re: Tell IIS to never force ISAPI to unload? by eselk2003

eselk2003
Tue May 13 16:34:03 CDT 2008

On May 5, 8:25=A0pm, David Wang <w3.4...@gmail.com> wrote:
> With Cache ISAPI Extensions enabled, the only time IIS is going to
> TerminateExtension is if the worker process is terminating due to
> application pool health policy reason, and that cannot be stopped. By
> default, there are several health policies that will result in
> frequent TerminateExtension calls.
>
> So, it sounds like you want to configure the Application Pool used for
> your ISAPI DLL to *never* recycle under any circumstance, thus keeping
> your ISAPI DLL loaded in memory after the first request that triggers
> your ISAPI DLL to load.
>

Thank you. I didn't know about those settings (recycle). Found them,
and turned them off, now it never unloads.