PRB: ASP 0197 When You Store STA or Both-Model Objects in Application (255769)
The information in this article applies to:
- Microsoft Active Server Pages
This article was previously published under Q255769 SYMPTOMS
When you run an Active Server Pages (ASP) page, the following error message appears:
Application object, ASP 0197 (0x80004005)
Cannot add object with apartment model behavior to the application intrinsic object.
CAUSE
Either the ASP code tried to store a single-threaded apartment (STA) COM object or a both-modeled COM object that does not support the free-threaded marshaler (FTM) in application scope.
RESOLUTION
To resolve this problem, design components marked both that aggregate the FTM if stored in application scope. Do not store STA objects in application scope or session scope.
STATUS
This behavior is by design. Objects stored in either session or application scope are going to be in a different COM apartment. For their interfaces to be used at page scope, these must be marshaled. However there is no support for marshaling the ASP built-in objects.
REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
243544 INFO: Component Threading Model Summary Under Active Server Page
243543 INFO: Do Not Store STA Objects in Session or Application
235718 FTM Aggregated Objects Should Not Hold Proxies.
Modification Type: | Major | Last Reviewed: | 2/26/2002 |
---|
Keywords: | kbDSupport kberrmsg kbPerformance kbprb kbScalability kbState KB255769 |
---|
|