Article ID: 818612 - Last Review: October 25, 2005 - Revision: 5.2 FIX: "COM Object Can Not Be Used" Error Message When You Use an STA COM Object That You Created by Using Server.CreateObject and Stored in Session Scope in a Different Web PageOn This PageSYMPTOMSYou create a single-threaded apartment (STA) COM object by using Server.CreateObject, and then you store this STA COM object in session scope. If you use this STA COM object from another Web page, you receive the following error message:
COM object that has been separated from its underlying RCW can not be used RESOLUTIONImportant To apply this hotfix, you must have the .NET Framework Service Pack 2 installed. How to obtain the hotfixThis issue is fixed in the June 2003 ASP.NET Hotfix Package 1.1. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:821156
(http://support.microsoft.com/kb/821156/
)
INFO: ASP.NET 1.1 June 2003 Hotfix Rollup Package You cannot obtain this fix individually. You must
install the rollup.Note When you request this hotfix, you receive the rollup. The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel. Date Time Version Size File name -------------------------------------------------------------- 25-Apr-2003 03:19 1.0.3705.424 196,608 Aspnet_isapi.dll 25-Apr-2003 03:19 510,714 Aspnet_perf2.ini 25-Apr-2003 03:15 4,169 Aspnet_perf.h 25-Apr-2003 03:19 513,302 Aspnet_perf.ini 25-Apr-2003 03:19 1.0.3705.424 24,576 Aspnet_regiis.exe 25-Apr-2003 03:19 1.0.3705.424 28,672 Aspnet_wp.exe 24-Apr-2003 15:49 1.0.3705.424 69,632 Corperfmonext.dll 24-Apr-2003 15:47 1.0.3705.424 303,104 Mscorjit.dll 25-Apr-2003 12:55 1.0.3705.424 1,953,792 Mscorlib.dll 24-Apr-2003 15:48 1.0.3705.424 2,269,184 Mscorsvr.dll 01-Aug-2002 18:38 15 Smartnav.htm 17-Oct-2002 14:55 8,728 Smartnav.js 24-Apr-2003 15:40 10,284 Mscorlib.ldo 24-Apr-2003 15:48 1.0.3705.424 2,269,184 Mscorwks.dll 25-Apr-2003 12:59 1.0.3705.424 1,191,936 System.web.dll This hotfix is also available for the German version of the Microsoft .NET Framework 1.0. This hotfix is also available for the French version of the Microsoft .NET Framework 1.0. If you applied the hotfix in this article for Microsoft ASP.NET included with the .NET Framework 1.0, and if you upgraded to Microsoft ASP.NET included with the .NET Framework 1.1, apply the hotfix package from the following Microsoft Knowledge Base article: 821156
(http://support.microsoft.com/kb/821156/
)
INFO: ASP.NET 1.1 June 2003 Hotfix Rollup Package
Additionally, if you upgraded to the .NET Framework 1.1, and if you experience the symptoms in this article, apply the hotfix package from this Microsoft Knowledge Base article.STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. MORE INFORMATIONIf you create an STA object by using Server.CreateObject
(Attribute AspCompat ="true"), you can use the object only in the
Web page that you created it for. If you store the object in session scope, and then you try to gain access to it from
a different Web page, you receive the error message. Additionally, if you implement the OnStartPage method and the OnEndPage method from your STA COM object, these methods are not called on your object in the second Web page. Steps to reproduce the behavior
| Article Translations
|

Back to the top
