PRB: Cannot Launch Out of Process Component Under IIS 4 (184682)
The information in this article applies to:
- Microsoft Active Server Pages, when used with:
- Microsoft Internet Information Server 4.0
- Microsoft Internet Information Server 5.0
This article was previously published under Q184682 SYMPTOMS
Although most ActiveX Server components are dynamic-link libraries (DLLs),
it is sometimes necessary to launch an EXE file from Active Server Pages
(ASP). When Server.CreateObject is used to launch an EXE file, an error
similar to the following may occur:
Server object error 'ASP 0196 : 80040154'
Cannot launch out of process component
/test/test.asp, line 12
Only InProc server components should be used. If you want to use
LocalServer components, you must set the AspAllowOutOfProcComponents
metabase setting. Please consult the help file for important
considerations.
MORE INFORMATION
This error is the result of a safety mechanism in Active Server Pages that
prevents the launching of LocalServer components. This mechanism is in
place because there are security concerns you should consider when
launching out-of-process components. In addition to the security concerns,
DLLs are also preferred because of their performance benefits over EXEs,
and their ability to be hosted by Microsoft Transaction Server (MTS).
To override this safety mechanism, you must change the value in the
AspAllowOutOfProcComponents metabase setting to TRUE. This metabase setting
is accessible through the IIsWebService and IIsWebVirtualDir Admin objects.
- If you set AspAllowOutOfProcComponents to TRUE on the IIsWebService
object, all "In-proc Web Applications" will be able to launch
localservers. An "In-proc Web Application" is a Virtual Root that has
been marked as an Application, but is not designated to "Run in separate
memory space."
- If you set the AspAllowOutOfProcComponents value to TRUE on the
IIsWebVirtualDir object, and the Application is marked to "Run as
separate memory space," then localservers can be launched. If the
Application is set to run In-proc, this parameter will have no effect,
and you must instead enable AspAllowOutOfProComponents on the
IIsWebService object.
Notes on Accessing the Metabase
You must have adequate permissions to modify the metabase. If you attempt
to modify the metabase from an ASP script without sufficient permissions,
you may encounter an "Invalid Syntax" error or other error. One possible
workaround is to force authentication as a user with Administrative rights
on the ASP page that makes the metabase modifications.
ASP scripts that access the metabase must be run from In-Proc Applications.
If you have marked your application to "Run as separate memory space" in
the MMC, you will receive an "Invalid Syntax" or other error message when
the ASP script attempts to access the metabase.
Configuring the Metabase for AspAllowOutOfProcComponents
The following ASP code segment demonstrates the steps required to set the
AspAllowOutOfProcComponents parameter on the IIsWebService Admin object.
<%
' Get the IIsWebService Admin Object
Set WebServObj = GetObject("IIS://LocalHost/W3svc")
' Enable the AspAllowOutOfProcComponents Parameter
WebServObj.Put "AspAllowOutOfProcComponents", True
' Save the changed value to the metabase
WebServObj.SetInfo
%>
The following ASP code segment demonstrates the steps required to set the
AspAllowOutOfProcComponents parameter on the IIsWebVirtualDir Admin Object.
<%
' Get the IIsWebVirtualDir Admin Object
Set VDirObj = GetObject("IIS://LocalHost/W3svc/1/Root/vdir_name")
' Enable the AspAllowOutOfProcComponents Parameter
VDirObj.Put "AspAllowOutOfProcComponents", True
' Save the changed value to the metabase
VDirObj.SetInfo
%>
NOTE: You will need to restart the Web server after making these changes.
To restart the Web server, type the following at a command prompt:
c:\> net stop iisadmin /y
c:\> net start w3svc
Alternatively, you can issue the command directly using ADSUTIL from a command prompt:
C:\WINNT\system32\inetsrv\adminsamples>adsutil set w3svc/AspAllowOutOfProcComponents True
REFERENCES
For more information on the issues surrounding launching LocalServers from
ASP, refer to the Internet Information Server (IIS) Release Notes under the
"Other Known Problems and Limitations" section.
For more information on the IIS Admin objects, refer to the IIS
Programmer's Reference under the IIS Administration topic.
This article applies to IIS 4.0. For additional information on IIS 3.0, click the article number below
to view the article in the Microsoft Knowledge Base:
175166 Launching LocalServer Components(EXEs) from ASP (IIS 3.0)
For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
233968 AspAllowOutOfProcComponents Is Obsolete in IIS 5.0
Modification Type: | Minor | Last Reviewed: | 7/8/2005 |
---|
Keywords: | kbASPObj kberrmsg kbInetDev kbMetaBase kbprb kbSecurity KB184682 |
---|
|