Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How To Lifetime of a COM Component Under IIS, ASP, and RDS


View products that this article applies to.

This article was previously published under Q166279

↑ Back to the top


Summary

When you create your own ActiveX Server components running under Internet Information Server (Inetinfo.exe) for Active Server Pages (ASP) or Remote Data Service (RDS), you may get the following error message when you try to recompile or overwrite your DLL:

Permission Denied.
What you are encountering is a caching feature of Internet Information Server (IIS) that improves performance by keeping the DLL in memory for subsequent calls. IIS loads the DLLs, such as your ActiveX DLL, and holds onto them; even long after you have navigated to another page. Though your ActiveX DLL instance is released after the method returns, the DLL with the class factory for the object is still loaded in memory, making it impossible to overwrite or recompile.

With version 1.5, RDS has been renamed and merged with ActiveX Data Objects (ADO) to provide data remoting within the same programming model as ADO. Formerly, Remote Data Service was known as the Advanced Data Connector (ADC). To clarify the relationship of ADC to ADO, ADC is now known as the Remote Data Service (RDS), a feature of ADO.

↑ Back to the top


More information

Resolution #1

Internet Information Server version 3.0

The best way to flush this DLL cache is by stopping your WWW service by going into the Internet Service Manager, right-click the WWW service, and select Stop. This can also be done by typing the following command at the Windows NT Command Prompt:
Net Stop W3SVC

Then you can recompile or overwrite your DLL and restart your service by right-clicking the WWW service, and selecting Start, or by typing the following command at the NT Command Prompt:
Net Start W3SVC

To completely unload the Inetinfo.exe file, you need to stop MSFTPSVC and GOPHERSVC, but you do not have to do this if you just want to unload your ActiveX DLL component.

If you want to make restarting the WWW service considerably faster on a development IIS server, create the following value in the registry, of type REG_DWORD, and set it to zero.
   HKEY_LOCAL_MACHINE
    \SYSTEM
     \CurrentControlSet
      \Services
       \W3SVC
        \Parameters
         \EnableSvcLoc
				

Do the same for MSFTPSVC and GOPHERSVC if you are running them.

NOTE: On a production server the service locator should be enabled by setting the value to one.

Internet Information Server version 4.0

To release the DLL from Internet Information Server version 4.0's cache you must create and run the following batch file:

   == bound.bat
   net stop iisadmin /y
   mtxstop
   net start w3svc
				


Resolution #2

If the DLL is running in a Web that is running out-of-process, you can unload the application through the Microsoft Management Console for IIS. To do this, right-click the Web application, select Properties, and then click Unload.

This will stop the mtx.exe process for the out-of-process Web site and release the lock on the DLL. After you unload the application, you should be able to recompile the DLL.

↑ Back to the top


References

Web site for Remote Data Service:


Web site for Internet Information Server:

Remote Data Service newsgroup:
microsoft.public.data.ado.rds

Internet Information Server newsgroup:

microsoft.public.inetserver.iis


Active Server Pages newsgroup:

microsoft.public.inetserver.iis.activeserverpages


(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Jon Fowler, Microsoft Corporation

↑ Back to the top


Keywords: KB166279, kbhowto

↑ Back to the top

Article Info
Article ID : 166279
Revision : 8
Created on : 5/10/2006
Published on : 5/10/2006
Exists online : False
Views : 460