PRB: Server.CreateObject Fails when Object is Behind FirewallID: Q193230
|
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.
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)
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)
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.
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.
This behavior is by design.
Here's an example of Server.CreateObject syntax:
Dim objMyObject
Set objMyObject = Server.CreateObject("MyProgID.MyProgID")
Dim objMyObject
Set objMyObject = CreateObject("MyProgID.MyProgID")
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:
http://support.microsoft.com/support/vinterdev/
Additional query words:
Keywords : kberrmsg kbASP kbCOMt kbJScript kbScript kbSecurity kbVBScript kbGrpASP
Version : winnt:
Platform : winnt
Issue type : kbprb
Last Reviewed: May 27, 1999