Microsoft KB Archive/318555

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

Article ID: 318555

Article Last Modified on 4/27/2005

-

APPLIES TO


 * Microsoft Host Integration Server 2000 Standard Edition
 * Microsoft SNA Server 4.0 Service Pack 3
 * Microsoft SNA Server 4.0 Service Pack 4

-



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 &quot;More Information&quot; 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:  Paste the code into a text (.txt) file named ComtiCheck.vbs. Run the code from a command prompt as follows:

C:\>ComtiCheck &quot;COMTI Utilities&quot;

 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 &quot;Usage: ComtiCheck 'COMTISEC' --- where COMTISEC is the package name&quot; WScript.Quit (0) end if

applicationName = UCASE(objArgs(0))

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

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

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

For i = numComponents - 1 To 0 Step -1 Set component = components.Item(i) If component.Value(&quot;COMTIIntrinsics&quot;) Then wscript.echo components.Item(i).Name & &quot; is set to true&quot; Else wscript.echo components.Item(i).Name & &quot; is set to false&quot; 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:  Open the COMTI Manager and move to the COMTI Utilities Application Package. Right-click the COMTI Utilities Application Package, and then click Properties.</li> On the Advanced tab, verify that the Disable changes check box is clear, and then click OK.</li> Run the following script:   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: <pre class="fixed_text">C:\>ComtiSet &quot;COMTI Utilities&quot; all 1 This sets the COMTIIntrinsics property to True. </li> To set the property to False, enter a 0 instead of 1 in the argument list.</li> 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.</li></ol> </li> 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.</li></ol>

'Get arguments. Set objArgs = WScript.Arguments

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

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

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

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

<div class="references_section">