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

Article translations Article translations
Article ID: 287422 - View products that this article applies to.
This article was previously published under Q287422
Expand all | Collapse all

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:
  • Performance delays that are caused by additional RPC network traffic.
  • Permission is denied if there is a firewall between the server running IIS and the component server.
  • 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
  • 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
  • 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
Note These issues may occur intermittently.

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:
  1. 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 "IISIntrinsics"
        WScript.Echo ""
        WScript.Echo "Usage:"
        WScript.Echo "iisintrinsics [appname] [progid] [value]"
        WScript.Echo "[appname]: Name of the application"
        WScript.Echo "[progid]:  ProgID of the component to change. Type 'all' for all components."
        WScript.Echo "[value]:   0 for False, 1 for True"
        WScript.Quit (0)
    end if
    
    
    applicationName = objArgs(0)
    componentProgID = objArgs(1)
    iisIntrinsics = objArgs(2)
    
    Set catalog = CreateObject("COMAdmin.COMAdminCatalog.1")
    Set applications = catalog.GetCollection("Applications")
    
    applications.Populate
    numApplications = applications.Count
    
    For i = numApplications - 1 To 0 Step -1
        If applications.Item(i).Value("Name") = applicationName Then
            Set application = applications.Item(i)
            Exit For
        End If
    Next
    
    Set components = applications.GetCollection("Components", application.Value("ID"))
    components.Populate
    numComponents = components.Count
    
    For i = numComponents - 1 To 0 Step -1
        If components.Item(i).Name = componentProgID Or componentProgID = "all" Then
      	WScript.Echo "Set IISIntrinsics to " + iisIntrinsics  + " for " _
    +components.Item(i).Name 
            Set component = components.Item(i)
            component.Value("IISIntrinsics") = iisIntrinsics
        End If
    Next
        
    components.SaveChanges
    applications.SaveChanges
    					
  2. At a command prompt on the computer that is running IIS, type the following command:
    IISIntrinsics <appname> <progid> <value>
    In this command:
    • <appname> is the name of the application.
    • <progid> is the ProgID of the component that you want to change. You can type all to change all components.
    • <value> is "0" stands for False (or to turn off marshaling), and "1" stands for True.
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

Properties

Article ID: 287422 - Last Review: December 5, 2007 - Revision: 8.2
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
    • Microsoft Windows XP Home Edition
    • Microsoft Windows XP Professional
    • Microsoft Windows XP Media Center Edition
  • Microsoft COM+ 1.5, when used with:
    • Microsoft Windows 2000 Datacenter Server
    • Microsoft Windows 2000 Advanced Server
    • Microsoft Windows 2000 Server
    • Microsoft Windows 2000 Professional Edition
    • Microsoft Windows XP Home Edition
    • Microsoft Windows XP Professional
    • Microsoft Windows XP Media Center Edition
Keywords: 
kbprb KB287422

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com