Shutting Down an Extension

TerminateExtension is an optional entry point function you can include in your extension. If you do provide this entry point, IIS will call it before removing the extension from memory. It is recommended that you use TerminateExtension to shut down any worker threads that your extension has used during processing.