Article ID: 833891 - Last Review: July 3, 2008 - Revision: 4.1 How to resolve Retain in Memory and Unattended Execution problems in ActiveX controls that are running on IISWe strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 7.0 running on Microsoft Windows Server 2008. IIS 7.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site: http://technet.microsoft.com/en-us/library/dd450371.aspx
(http://technet.microsoft.com/en-us/library/dd450371.aspx)
For more information about IIS 7.0, visit the following Microsoft Web site: http://www.iis.net/default.aspx?tabid=1
(http://www.iis.net/default.aspx?tabid=1)
SUMMARYThis article helps Web server administrators and developers to discover and to resolve problems with miscompiled Microsoft Visual Basic 6.0 DLLs. MORE INFORMATIONMicrosoft Internet Information Services (IIS) is a multi-threaded process that requires special consideration when you develop and use Visual Basic 6.0 DLLs.
Two properties of Visual Basic 6.0, the Retain in Memory property and the Unattended Execution property, must both be set to True to run in IIS. Miscompiled Visual Basic DLLs are the Visual Basic DLLs that are compiled with the Retain in Memory property set to False, with the Unattended Execution property set to False, or with both properties set to False. For more informationabout the Retain in Memory property and the Unattended Execution property, click the following article number to view the article in the Microsoft Knowledge Base: 241896
(http://support.microsoft.com/kb/241896/
)
Threading issues with Visual Basic 6.0 ActiveX components
Different symptoms may occur on your Web server if Visual Basic DLLs are miscompiled. For example, IIS may stop responding (hang), IIS may crash, or you may receive HTTP 500 error messages.
You can download and use the IIS Debug toolkit to determine if you have any loaded Visual Basic DLLs that are miscompiled. To download the IIS Debug toolkit, visit the following Microsoft Web site: http://www.microsoft.com/downloads/details.aspx?FamilyID=01c4f89d-cc68-42ba-98d2-0c580437efcf&DisplayLang=en
(http://www.microsoft.com/downloads/details.aspx?FamilyID=01c4f89d-cc68-42ba-98d2-0c580437efcf&DisplayLang=en)
To check these properties on your loaded Visual Basic DLLs, extract the toolkit files, and then run the following command on your Web server:
iisdump -s This command generates a file that is named Sysinfo_datetimestamp.xml. Scan the file for information that resembles the following:DLL Path="C:\INETPUB\WWWROOT\SIMPLE.DLL" Version="1.0.0.0" Timestamp="12/01/2004 15:08:42" UnattendedExecution="false" RetainInMemory="false" If you have miscompiled Visual Basic DLLs, use one of the following methods to resolve the problem based on your version of IIS: IIS 4.0Make sure that the version of Msvbvm60.dll is 6.0.96.32 or later and that the file is dated June 21, 2002 or later. If you do not have this version or a later version of Msvbvm60.dll, you can update the Visual Basic runtime. To update the Visual Basic runtime, visit the following Microsoft Web site:http://activex.microsoft.com/controls/vb6/vbrun60.cab
(http://activex.microsoft.com/controls/vb6/vbrun60.cab)
Note Alternatively, you can recompile the Visual Basic DLL with both the Retain in Memory property set to True and the Unattended Execution property set to True. IIS 5.0Make sure that the version of MSvbvm60.dll is 6.0.96.32 or later and that the file is dated June 21, 2002 or later. To do this, use either of the following methods:
IIS 5.1Make sure that the version of Msvbvm60.dll is 6.0.96.32 or later and that the file is dated June 21, 2002 or later. If you do not have this version or a later version of Msvbvm60.dll, you can update the Visual Basic runtime. To update the Visual Basic runtime, visit the following Microsoft Web site:http://activex.microsoft.com/controls/vb6/vbrun60.cab
(http://activex.microsoft.com/controls/vb6/vbrun60.cab)
Note Alternatively, you can recompile the Visual Basic DLL with both the Retain in Memory property set to True and the Unattended Execution property set to True. IIS 6.0The server may be running in worker process isolation mode or in compatibility mode.If the server is running in worker process isolation mode and if Service Pack 1 (SP1) is installed, no action is required. If SP1 is not installed, do either of the following:
Alternatively, you can recompile the Visual Basic DLL with both the Retain in Memory property set to True and the Unattended Execution property set to True. REFERENCES
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
264957
(http://support.microsoft.com/kb/264957/
)
Visual Basic DLL has memory leaks and crashes in COM+ if 'Retain In Memory' is not set
307211
(http://support.microsoft.com/kb/307211/
)
You can configure the Unattended Execution option and the Retained In Memory option in the latest version of Msvbvm60.dll
301237
(http://support.microsoft.com/kb/301237/
)
How to create a Visual Basic project template for creating IIS components
186273
(http://support.microsoft.com/kb/186273/
)
BUG: AV running VB-built component in multi-threaded environment
243548
(http://support.microsoft.com/kb/243548/
)
Design guidelines for Visual Basic components under ASP
191119
(http://support.microsoft.com/kb/191119/
)
FIX: VB classes can cause IIS to have access violations
| Article Translations
|
Back to the top
