Microsoft KB Archive/193230

From BetaArchive Wiki

Article ID: 193230

Article Last Modified on 5/3/2006



APPLIES TO

  • Microsoft Active Server Pages 4.0
  • Microsoft Internet Information Server 4.0



This article was previously published under Q193230

We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

SYMPTOMS

In Active Server Pages, when instantiating a COM object on a remote computer that is located behind a firewall, the following error occurs:

Server object error 'ASP 0177 : 800706be'
Server.CreateObject Failed
/file.asp, line #
The remote procedure call failed.


The following log entry may be present in the Application Event Log of the IIS server:

MTS Event 4134
Failed on creation from object context: CreateInstance
(ProgId: <ProgId>)
(CLSID: {<CLSID>})
(Interface: IUnknown)
(IID: {00000000-0000-0000-C000-000000000046})
(Microsoft Transaction Server Internals Information: File:
d:\viper\src\runtime\context\ccontext.cpp, Line: 1228)


The following log entry may be present in the Application Event Log of the computer on which the object was configured to be launched:

Event 4097
The run-time environment has detected an inconsistency in its internal
state and has terminated the process. Please contact Microsoft Product
Support Services to report this error. Internal Check Failure on
condition: hr == S_OK
(Package: <name>)
(Microsoft Transaction Server Internals Information: File:
d:\viper\src\runtime\context\cuserprops.cpp, Line: 1047)

CAUSE

The Server.CreateObject method attempts to marshal the ASP intrinsic objects (Request, Response, and so forth) to Microsoft Transaction Server (MTS). When the MTS server is behind a firewall, MTS is unable to unmarshal these intrinsic objects because Interface Callbacks are not possible across DCOM Firewalls. Thus, the creation of the object fails.

RESOLUTION

The CreateObject function in VBScript does not use MTS, and the ASP intrinsic objects are not marshaled, so the creation of the COM object works fine across the firewall.

The drawbacks of using the VBScript CreateObject function instead of the ASP Server.CreateObject method, is that the ASP page will not be a part of the same MTS transaction as the component, the component behind the firewall cannot use any of the ASP intrinsic objects, nor can the component obtain any security information about the page.

The component can still participate in a MTS transaction, but no information concerning the failure or success of the transaction is passed back to the ASP page due to the page being in a different transaction.

STATUS

This behavior is by design.

MORE INFORMATION

Here's an example of Server.CreateObject syntax:

   Dim objMyObject
   Set objMyObject = Server.CreateObject("MyProgID.MyProgID")
                


Here's an example of CreateObject syntax:

   Dim objMyObject
   Set objMyObject = CreateObject("MyProgID.MyProgID")
                

REFERENCES

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:


(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by John
Lewis, Microsoft Corporation.


Keywords: kberrmsg kbscript kbsecurity kbprb KB193230