Microsoft KB Archive/287422

= IIS intrinsics flow by default when you call COM+ components from IIS 5.0 and later versions of IIS =

Article ID: 287422

Article Last Modified on 12/5/2007

-

APPLIES TO

 Microsoft Internet Information Services 5.0 Microsoft COM+ 1.0, when used with:  Microsoft Windows 2000 Professional Edition

 Microsoft Windows 2000 Advanced Server

 Microsoft Windows 2000 Server

 Microsoft Windows 2000 Datacenter Server</li></ul>

 Microsoft Windows XP Home Edition</li></ul>

 Microsoft Windows XP Professional</li></ul>

 Microsoft Windows XP Media Center Edition 2002</li></ul> </li> Microsoft COM+ 1.5, when used with:  Microsoft Windows 2000 Datacenter Server</li></ul>

 Microsoft Windows 2000 Advanced Server</li></ul>

 Microsoft Windows 2000 Server</li></ul>

 <li>Microsoft Windows 2000 Professional Edition</li></ul>

<ul> <li>Microsoft Windows XP Home Edition</li></ul>

<ul> <li>Microsoft Windows XP Professional</li></ul>

<ul> <li>Microsoft Windows XP Media Center Edition 2002</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q287422

<div class="symptoms_section">

SYMPTOMS
Internet Information Services (IIS) 5.0 and later versions of IIS always marshal the IIS intrinsic objects (IIS intrinsics) whether you use the CreateObject method or the Server.CreateObject method to invoke COM+ components. This behavior differs from the behavior of IIS 4.0. In IIS 4.0, IIS intrinsics are only marshaled when you use the Server.CreateObject method and not when you use the CreateObject method. The IIS intrinsics that are typically used in ASP or ISAPI applications include Application, Server, Session, Request and Response objects.

Additionally, when the computer that is running IIS creates components on a remote computer, either directly or by using an intermediate component, you may experience the following problems because of the network callbacks that are required to marshal the IIS intrinsics: <ul> <li>Performance delays that are caused by additional RPC network traffic.</li> <li>Permission is denied if there is a firewall between the server running IIS and the component server.</li> <li>If the component server cannot contact the server that is running IIS, you receive the following error message:

0x800706ba (1722 or 0x6ba) or RPC_S_SERVER_UNAVAILABLE

</li> <li>When a network transport failure occurs while marshaling IIS intrinsics, you receive the following error message:

0x800706be (1726 or 0x6be) or RPC_S_CALL_FAILED

</li> <li>COM+ event 4097 occurs, and you receive an error message that is similar to one of the following:

VariantMarshal: CoMarshalInterface for IID_IUnknown failure

VariantMarshal: CoMarshalInterface for IID_IDispatch failure

VariantUnmarshal: CoUnmarshalInterface for IID_IUnknown failure

VariantUnmarshal: CoUnmarshalInterface for IID_IDispatch failure

</li></ul>

Note These issues may occur intermittently.

<div class="workaround_section">

WORKAROUND
If you want a remote procedure call (RPC) to persist across transport failures, the application may have to retry the call one or more times, retrying with decreasing frequency.

Alternatively, if the IIS intrinsics are not required by the COM+ components which are created by the IIS application, turn off the marshaling of IIS intrinsics for those components on the computer that is running IIS. To do this, follow these steps: <ol> <li> In any text editor, create a file. Name the file IISIntrinsics.vbs. Paste the following script in the file. 'Get arguments Set objArgs = WScript.Arguments

if objArgs.Count <> 3 then WScript.Echo &quot;IISIntrinsics&quot; WScript.Echo &quot;&quot; WScript.Echo &quot;Usage:&quot; WScript.Echo &quot;iisintrinsics [appname] [progid] [value]&quot; WScript.Echo &quot;[appname]: Name of the application&quot; WScript.Echo &quot;[progid]: ProgID of the component to change. Type 'all' for all components.&quot; WScript.Echo &quot;[value]:  0 for False, 1 for True&quot; WScript.Quit (0) end if

applicationName = objArgs(0) componentProgID = objArgs(1) iisIntrinsics = objArgs(2)

Set catalog = CreateObject(&quot;COMAdmin.COMAdminCatalog.1&quot;) Set applications = catalog.GetCollection(&quot;Applications&quot;)

applications.Populate numApplications = applications.Count

For i = numApplications - 1 To 0 Step -1 If applications.Item(i).Value(&quot;Name&quot;) = applicationName Then Set application = applications.Item(i) Exit For End If Next

Set components = applications.GetCollection(&quot;Components&quot;, application.Value(&quot;ID&quot;)) components.Populate numComponents = components.Count

For i = numComponents - 1 To 0 Step -1 If components.Item(i).Name = componentProgID Or componentProgID = &quot;all&quot; Then WScript.Echo &quot;Set IISIntrinsics to &quot; + iisIntrinsics + &quot; for &quot; _ +components.Item(i).Name Set component = components.Item(i) component.Value(&quot;IISIntrinsics&quot;) = iisIntrinsics End If Next components.SaveChanges applications.SaveChanges </li> <li>At a command prompt on the computer that is running IIS, type the following command:

IISIntrinsics <appname> <progid> <value>

In this command: <ul> <li><appname> is the name of the application.</li> <li><progid> is the ProgID of the component that you want to change. You can type all to change all components.</li> <li><value> is &quot;0&quot; stands for False (or to turn off marshaling), and &quot;1&quot; stands for True.</li></ul> </li></ol>

Note You can only turn off or turn on the IISintrinsics property on COM+ components. However, if the COM+ application is one of the IIS-generated COM+ applications such as IIS In-Process Applications, IIS Out-Of-Process Pooled Applications, and others, you cannot turn off the IISIntrinsics property in this manner.

You can also use the Explore.vb file or the Explore.vc file from the COM+ Administration Software Development Kit (SDK) samples. These files are included with the Platform SDK. They are located in the Program Files\Microsoft Platform SDK\Samples\Com\Administration folder. You must set the IISIntrinsics property for the component to False. To download the Platform SDK, visit the following Microsoft Developer Network (MSDN) Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en

Additional query words: ASP IISintrinsics COMplus mts server.createobject createobject

Keywords: kbprb KB287422

-

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

© Microsoft Corporation. All rights reserved.