PRB: COMTI Explicit Security does not succeed because COMTIIntrinsics property is set to False by default (318555)



The information in this article applies to:

  • Microsoft Host Integration Server 2000
  • Microsoft SNA Server 4.0 SP3
  • Microsoft SNA Server 4.0 SP4

This article was previously published under Q318555

SYMPTOMS

COM Transaction Integrator (COMTI) Explicit Security does not succeed if the security component (COMTI.HostSecurityContext) is installed on a computer that is running Microsoft Windows 2000 and that has Service Pack (SP) 3 or any COM+ Rollup Hotfix 10 or later installed.

The error occurs when calling the SetCallbackObject method.

In Visual Basic, you receive the following error message:
0x80004005 (-2147467259), Automation error Unspecified error, Method '~' of object '~' failed.

CAUSE

Explicit Security works only when the COMTI.HostSecurityContext component has this property set to True (or ON). However, beginning with COM+ Rollup Hotfix 10, by default, the COMTIIntrinsics property is set to False.

RESOLUTION

For both products to which this article applies, you can use the Visual Basic Script (VBScript) sample code in the "More Information" section to verify and set the COMTIIntrinsics property. After you set the property correctly, it stays set unless you delete the COMTI.HostSecurityContext component.

For SNA Server 4.0, the property stays set unless you also reinstall the Comtisec.dll file into Component Services.

Host Integration Server 2000

To correct this issue, install Host Integration Server SP 1 after you install Windows 2000 SP 3. (Alternatively, you can use the VBScript sample code as mentioned earlier in this section.)

To set the property to True automatically when you install Comtisec.dll in Component Services, you must install Windows 2000 SP 3 and Host Integration Server SP 1 on the server.

MORE INFORMATION

The VBScript sample code in this section checks the COMTIIntrinsics property.

If the COMTIIntrinsics property is set to False for COMTI.HostSecurityContext, use the VBScript shown later in this section to set COMTIIntrinsics to True, and then rerun the sample code to verify that the COMTIIntrinsics property is set correctly.

To use the VBScript sample code, follow these steps:
  1. Paste the code into a text (.txt) file named ComtiCheck.vbs.
  2. Run the code from a command prompt as follows:

    C:\>ComtiCheck "COMTI Utilities"

  3. If the name of the application package where the Comtisec.dll is installed has been changed from the default name of COMTI Utilities, use the appropriate application package name.

VBScript Sample Code

'Get arguments.
   Set objArgs = WScript.Arguments

   if objArgs.Count <> 1 then
       WScript.Echo "Usage: ComtiCheck 'COMTISEC' --- where COMTISEC is the package name"
       WScript.Quit (0)
   end if

   applicationName = UCASE(objArgs(0))

   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 UCASE(applications.Item(i).Value("Name")) = applicationName Then
           Set application = applications.Item(i)
           Exit For
       End If
       If i = 0 Then
         WScript.Echo "Package Name Not Found - " & applicationName
         WScript.Quit (0)
       End If       
   Next

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

   If numComponents = 0 Then
     wscript.echo "No components installed in package - " & applicationName
     wscript.quit (0)
   End If

   For i = numComponents - 1 To 0 Step -1
     	   Set component = components.Item(i)
           If component.Value("COMTIIntrinsics") Then
                  wscript.echo components.Item(i).Name & " is set to true"
           Else
                  wscript.echo components.Item(i).Name & " is set to false"
           End If
   Next
				

If COMTIIntrinsics is False for COMTI.HostSecurityContext

As mentioned earlier, if COMTIIntrinsics is set to False for the COMTI Utilities package, follow these steps to set the property to True:
  1. Open the COMTI Manager and move to the COMTI Utilities Application Package.
  2. Right-click the COMTI Utilities Application Package, and then click Properties.
  3. On the Advanced tab, verify that the Disable changes check box is clear, and then click OK.
  4. Run the following script:
    1. To use the script, copy and paste it to a text document named ComtiSet.vbs, and then run the code from a command prompt as follows:
      C:\>ComtiSet "COMTI Utilities" all 1
      							
      This sets the COMTIIntrinsics property to True.
    2. To set the property to False, enter a 0 instead of 1 in the argument list.
    3. If the name of the Application Package where the comtisec.dll is installed has been changed from the default COMTI Utilities, use the appropriate application package name.

      If there are other components installed in the application package (not a recommended configuration), you can use the ProgID (COMTI.HostSecurityContext) to set the COMTIIntrinsics property on only that component.
  5. After you run the following script, rerun the VBScript sample code from earlier in this section to verify that the COMTIIntrinsics property is set correctly.
'Get arguments.
   Set objArgs = WScript.Arguments

   if objArgs.Count <> 3 then
       WScript.Echo "ComtiSet"
       WScript.Echo ""
       WScript.Echo "Usage:"
       WScript.Echo "ComtiSet [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 = UCASE(objArgs(0))
   componentProgID = objArgs(1)
   ComtiIntrinsics = 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 UCASE(applications.Item(i).Value("Name")) = applicationName Then
           Set application = applications.Item(i)
           Exit For
       End If
       If i = 0 Then
         WScript.Echo "Package Name Not Found - " & applicationName
         WScript.Quit (0)
       End If       
   Next

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

   If numComponents = 0 Then
     wscript.echo "No components installed in package - " & applicationName
     wscript.quit (0)
   End If

   For i = numComponents - 1 To 0 Step -1
       If components.Item(i).Name = componentProgID Or componentProgID = "all" Then
     	   Set component = components.Item(i)
           component.Value("COMTIIntrinsics") = ComtiIntrinsics
       End If
   Next
       
   components.SaveChanges
   applications.SaveChanges
   WScript.Echo "Changes All Complete"
				

REFERENCES

For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

314516 COMTI Explicit Security feature does not work

292818 FIX: COMTIIntrinsics property Is not False by default


Modification Type:MinorLast Reviewed:4/27/2005
Keywords:kbprb KB318555 kbAudDeveloper