BUG: Some FMStocks and Duwamish deployment scenarios do not work correctly (316571)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition

This article was previously published under Q316571

SYMPTOMS

When you deploy the FMStocks or the Duwamish sample application on a computer that is running Microsoft Windows XP Professional, the deployment fails with following error message:
Access is denied.
Also, if you deploy the FMStocks application from Windows XP Professional to Microsoft Windows 2000, you receive the following error message when you try to run the application:
FMStocks7.GAM is not registered with Windows 2000 Component Services
Note that you do not receive an error message during deployment in the second scenario.

CAUSE

Access Is Denied Error Message

In Microsoft Windows 2000, Windows Management (WinMgmt.exe) is a separate, automatic service that runs under the LocalSystem account. To minimize the overhead of system services and to enable tighter control over the use of system resources, Windows XP migrates WinMgmt.exe to SVCHOST.

The migration itself is transparent for Windows Management Instrumentation (WMI) clients. However, WinMgmt.exe now shares the same host with other system services. The security regulations for the service host require that all remote connections use packet-level authentication (RPC_C_AUTHN_LEVEL_PKT). Therefore, you must set the authentication level to Packet in Windows XP Professional.

Because the Connect authentication level (RPC_C_AUTHN_LEVEL_CONNECT) does not meet the Windows XP security requirement, you cannot use the Connect authentication level in Windows XP. Because both the FMStocks and the Duwamish applications set the authentication level to Connect, you receive the "Access is denied" error message when you try to deploy the FMStocks or the Duwamish application on Windows XP.

FMStocks7.GAM Is Not Registered Error Message

The FMStocks application fails to run because FMStocks uses the COMAdmin.dll dynamic-link library (DLL) to configure COM+ applications. To use COMAdmin.dll from managed code, the application uses the Type Library Importer (Tlbimp.exe) at setup to create a managed wrapper.

The interfaces that COMAdmin.dll exposes differ slightly between Windows 2000 and Windows XP Professional. When you deploy FMStocks from Windows XP Professional to Windows 2000, the wrapper that is produced in Windows XP Professional runs on Windows 2000, which causes the query for the interface to fail.

RESOLUTION

Access Is Denied Error Message

FMStocks

To work around this problem in the FMStocks application, follow these steps to change the authentication level to Packet:
  1. Locate the FMS project in the Tools folder.
  2. Open the Utils.cs file, and then locate line 520:
    mo.Scope.Options.Authentication = AuthenticationLevel.Connect;
    					
  3. Change line 520 of the Utils.cs file as follows:
    mo.Scope.Options.Authentication = AuthenticationLevel.Packet;
    					
  4. Rebuild the FMS project, and then use the newly compiled Fms.exe file to deploy the application on Windows XP.
Alternately, you can follow the steps that are outlined in the following sections of the "Fitch and Mather 7.0" portion of the Visual Studio .NET Help documentation:

Duwamish

Because the source code for the DeployTool.exe utility is not included with the Duwamish application, you must manually copy and configure remoting configuration files to work around this problem in the Duwamish application.

For more information, see the following sections of the "Duwamish 7.0" portion of the Visual Studio .NET Help documentation:

FMStocks7.GAM Is Not Registered Error Message

To work around this problem, use the Component Services snap-in to manually register the General Accounting Module (.gam) file.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Microsoft Visual Studio .NET includes two enterprise sample applications: Duwamish and FMStocks. The Duwamish and the FMStocks sample applications are located in following folder:

Drive where Visual Studio .NET is installed:\Program Files\Microsoft Visual Studio .NET\Enterprise Samples

You may want to deploy these applications from one system to another system that may or may not be running the same operating system. The FMStocks sample is distributed by using the FMS.exe utility, and the Duwamish sample is distributed by using the DeployTool.exe utility.

Microsoft does not support some of these deployment scenarios, and some of these deployment scenarios fail because of bugs. The following list outlines which scenarios Microsoft supports and whether the scenario succeeds or fails:
  • Deployment Scenario: Deploy on same computer that is running Windows 2000.
    • FMStocks: Supported and successful.
    • Duwamish: Supported and successful.
    • FMStocks with Oracle Database: Supported and successful.
  • Deployment Scenario: Deploy on same computer that is running Windows XP Professional.
    • FMStocks: Supported and successful.
    • Duwamish: Supported and successful.
    • FMStocks with Oracle Database: Supported and successful.
  • Deployment Scenario: Deploy from Windows 2000 to Windows XP Professional.
    • FMStocks: Supported but unsuccessful because of WMI-related bug. Change the authentication level to Packet to work around this problem.
    • Duwamish: Supported but unsuccessful because of WMI-related bug. Manually copy and configure remoting configuration files to work around this problem.
    • FMStocks with Oracle Database: Not supported.
  • Deployment Scenario: Deploy from Windows XP Professional to Windows 2000.
    • FMStocks: Supported but unsuccessful because of the configuration bug. Manually register the FMStocks7.gam file to work around this problem.
    • Duwamish: Supported and successful.
    • FMStocks with Oracle Database: Not supported.
  • Deployment Scenario: Deploy from Windows 2000 to Windows 2000 (two different computers).
    • FMStocks: Supported and successful.
    • Duwamish: Supported and successful.
    • FMStocks with Oracle Database: Not supported.
  • Deployment Scenario: Deploy from Windows XP Professional to Windows XP Professional (two different computers).
    • FMStocks: Supported but unsuccessful because of WMI-related bug. Change the authentication level to Packet to work around this problem.
    • Duwamish: Supported but unsuccessful because of WMI-related bug. Manually copy and configure remoting configuration files to work around this problem.
    • FMStocks with Oracle Database: Not supported.
  • Deployment Scenario: Deploy from Windows 2000 to Windows 2000 with Microsoft Application Center.
    • FMStocks: Supported and successful.
    • Duwamish: Supported and successful.
    • FMStocks with Oracle Database: Not supported.

REFERENCES

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

316873 PRB: Cannot Run Windows XP COM+ Code on Windows 2000 Computer


Modification Type:MinorLast Reviewed:9/14/2005
Keywords:kbvs2002sp1sweep kbbug kbpending KB316571 kbAudDeveloper