SUMMARY
An Active Server Pages (ASP) application may make use of Component Object Model (COM) objects in dynamic link libraries (DLLs). When such an ASP application is running, the DLL is loaded into memory. While it is loaded in memory, Windows locks the file so that it cannot be updated. Occasionally, you may need to update the DLL file as part of development or maintenance processes. This step-by-step article describes how to update DLL files from an active ASP application.
back to the top
Requirements
The following items describe the recommended hardware, software, network infrastructure, skills and knowledge, and service packs that you need:
- Microsoft Windows NT version 4.0 with Service Pack 3 or later
- Familiarity with IIS site management, and the creation of in-process DLL COM components
back to the top
Determine if Site is Running In-Process or Out-of-Process
- Run the Internet Service Manager. To do this with Windows NT 4.0 and Internet Information Server (IIS) 4.0, click Start, click Windows NT 4.0 Option Pack, click Microsoft Internet Information Server, and then click Internet Service Manager. The Microsoft Management Console (MMC) appears.
- In the left pane, expand the Internet Information Server node.
- Select the node that corresponds to the name of the computer that hosts IIS.
- Select the Web site that this computer hosts. By default, each IIS installation has one site named Default Web Site, although the site administrator may have changed this.
- Select the virtual directory for the application that contains the DLL. Right-click the directory and then click Properties.
- Locate the Run in separate memory space (isolated process) check box. If this check box is selected, the application is running out-of-process. If this check box is not selected, the application is running in-process.
back to the top
Update a DLL in an Out-of-Process Site
To update a DLL in a site that is run out-of-process, unload the DLL from memory by clicking
Unload in the
Properties dialog box for the site. After you unload the DLL, the DLL file is no longer locked and may be updated as required. The new DLL is loaded as soon as the next browser client makes a request on the Web application that involves the COM component or components of the DLL.
back to the top
Update a DLL in an In-Process Site
If the site is running in-process, you can update the DLL by using either the Control Panel Services applet or a command prompt. Note that you must stop all of IIS before you can update the DLL.
To update the DLL by using the Control Panel Services applet, follow these steps:
- Stop IIS. To do this, click Start, click Settings, click Control Panel, and then double-click Services. Select IIS Admin Service and click Stop. When you are prompted to stop any extra services, such as the World Wide Web Publishing Service, click OK.
- Update the DLL file.
- Restart IIS. To do this, click Start, click Settings, click Control Panel, and then double-click Services. Select IIS Admin Service and then click Start. Select World Wide Web Publishing Service and then click Start.
To update the DLL by using a command prompt, follow these steps:
- Stop IIS. To do this, open a command prompt window and type net stop iisadmin /y.
- Update the DLL file.
- Restart IIS from the command line. To do this, open a command prompt window and type the following commands:
net start iisadmin
net start w3svc
back to the top
Troubleshooting
The
net stop iisadmin /y command stops all services that depend on IISAdmin. These services may include the Simple Mail Transport Protocol (SMTP) service and File Transfer Protocol (FTP) server, depending on your configuration. If these services are needed, you may need to include the
net start msftpsvc and
net start smtpsvc commands to restart the services.
back to the top
REFERENCES
For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
166279 HOWTO: Lifetime of a COM Component Under IIS, ASP, and RDS
back to the top