Microsoft KB Archive/275293

= FIX: DLLHOST Process Ends When Transacted WSC Components Are Called from IIS =

Article ID: 275293

Article Last Modified on 5/28/2003

-

APPLIES TO


 * Microsoft COM+ 1.0, when used with:
 * Microsoft Windows 2000 Standard Edition

-



This article was previously published under Q275293



SYMPTOMS
When you use Microsoft JScript to write Windows Script Components (WSC) and launch them from an Active Server Pages (ASP) page that is written in JScript, the DLLHOST process is terminated if the component throws an error on a Microsoft Windows 2000-based computer.

NOTE: This problem does not occur with script components that are written in other languages such as Microsoft Visual Basic Scripting Edition (VBScript), Microsoft Visual Basic, or Microsoft Visual C++, even though they have code that is similar to the JScript component and throw a similar error. Also, this problem does not occur if you change the scripting language from JScript to VBScript, either in the ASP page or in the component.



RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows 2000 Service Pack 2.



Steps to Reproduce Behavior
  In Notepad, create a new text file named JTest.wsc, and then paste the following code: 

<?component error=&quot;1&quot; debug=&quot;1&quot;?>



    

 < ![CDATA[

var __THIS_MODULE__ = &quot;JTest.obj_WSC&quot;; var undefined; var ut_oc = undefined;

try{ if(ut_oc == undefined) ut_oc = new ActiveXObject(&quot;MTxAS.AppServer.1&quot;).GetObjectContext; } catch(e){ throw e; }

// Public Functions function DisableCommit {   ut_oc.DisableCommit; }

function EnableCommit {   ut_oc.EnableCommit; }

function IsInTransaction {   ut_oc.IsInTransaction; }

function SetAbort {   ut_oc.SetAbort; }

function SetComplete {   ut_oc.SetComplete; }

]] >

  In Notepad, create a new text file named TestWsc.asp, and then paste the following code: <%@ Transaction=&quot;Required&quot; Language=&quot;JScript&quot; %> <% Response.Buffer = false; %> <%

function VerboseCreate(sProgID) {   var oObject; Response.Write (sProgID + &quot;...&quot;); oObject = Server.CreateObject (sProgID); Response.Write (&quot;Pass &quot;); return (oObject); }

function InstantiateObjects {   try{ var oTestXact1 = VerboseCreate(&quot;JTest.obj_WSC&quot;); var oTestXact2 = VerboseCreate(&quot;JTest.obj_WSC&quot;);

oTestXact1.SetAbort; oTestXact2.SetComplete;

oTestXact1 = null; oTestXact2 = null; }   catch(e){ Response.Write(&quot;<b>&quot; + &quot;FAILED: Exception: [&quot; + e.number + &quot;] &quot; + e.description + &quot; &quot; + &quot;</b>&quot;); } } %>

</li> On the Start menu, point to Programs, point to Administrative Tools, and click Internet Information Services.</li> Right-click Default Website, and then click Properties.</li> On the Home directory tab, in the Application Protection drop-down list box, click High (Isolated), and then click OK. With high protection, each component is executed inside a separate DLLHOST.</li> Right-click JTest.wsc, and then click Register to register the component.</li> Move TestWsc.asp to your default Web site's home directory, which is C:\Inetpub\Wwwroot by default.</li> Open Microsoft Internet Explorer, and type http://localhost/TestWsc.asp in the address bar. Internet Explorer endlessly loads the page with Exception: [-2147164157].</li> In Task Manager, check the processes. The DLLHOST process to surrogate JScript.wsc does not appear.</li></ol>

Additional query words: -2147164157

Keywords: kbbug kbcomplus kberrmsg kberror kbfix kbgrpdsvc kbiss kbwin2000presp2fix KB275293

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.