Unload a DLL or EXE to debug custom components

Unload a DLL or EXE to debug custom components

I am creating my own in-process ActiveX DLL in VB. I want to create an instance of the object in one of my ASP pages. My problem is that I am trying to debug my DLL and I can’t replace it when I make changes. The DLL is loaded and I can’t compile a new one unless I reboot my system. How can I unload my DLL by hand?


You may be able to avoid unloading components and rebooting the server. While debugging your DLL, you should turn off caching of ISAPI applications. Although caching enhances performance of a Web site by leaving the application in memory, it can be a real pain when you are trying to rebuild and update the cached components.

To turn off caching in Internet Information Server 4.0, open the Internet Service Manager and bring up the properties page for your virtual directory. On the Virtual Directory tab, in the Application Settings group box, click Configuration. On the App Mappings tab, clear the checkbox named “Cache ISAPI applications.” Keep in mind that if your application is already running, this will not immediately clear it from the cache. You’ll need to stop and restart the server to remove the application from memory.


Share the Post: