Microsoft KB Archive/840924

= In an FMStocks7 Web application, operations that use the GAM component do not work after you deploy DCOM on the remote computer =

Article ID: 840924

Article Last Modified on 5/18/2007

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Enterprise Developer, when used with:
 * Microsoft Windows XP Embedded
 * Microsoft Visual Studio .NET 2003 Enterprise Architect, when used with:
 * Microsoft Windows XP Embedded

-





SYMPTOMS
On a computer that is running Microsoft Windows XP Service Pack 1, when you run the Fitch & Mather Stocks 7.0 (FMStocks7) Web application, operations that use the General Accounting Module (GAM) do not work after you deploy DCOM on the computer. When this behavior occurs, the following error message may be logged in the application event log:

System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown ---> System.Runtime.InteropServices.COMException (0x8000401A): The server process could not be started because the configured identity is incorrect. Check the user name and password.



CAUSE
This behavior occurs because the GAM component on the remote computer is not started.



RESOLUTION
To resolve this behavior, you must manually restart the GAM component that is deployed on the remote computer.

Restart the GAM component
To restart the GAM component manually, follow these steps on the remote computer:
 * 1) Click Start, point to Settings, and then click Control Panel.
 * 2) In Control Panel, click Administrative Tools.
 * 3) In Administrative Tools, click Component Services. The Component Services window appears.
 * 4) In the left pane of the Component Services window, double-click Component Services.
 * 5) Expand Computers, expand My Computer, and then expand COM+ Applications.
 * 6) Right-click FMStocks7.GAM, and then click Start.

Troubleshooting
If the value of the userName attribute in the processModel tag is Machine, the following error message may be logged in the application event log:

System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown ---> System.InvalidCastException: QueryInterface for interface FMStocks7.GAM.IGAM failed.

To avoid this behavior, change the value of the userName attribute in the processModel tag to System.



STATUS
This behavior is by design.



Steps to reproduce the behavior
 Install Microsoft Visual Studio .NET 2003, Enterprise Architect Edition, on a computer that is running Windows XP Service Pack 1. Install the FMStocks7 Web application:  Locate the FMStocks7.msi file in the following folder:

\Program Files\Microsoft Visual Studio .NET 2003\Enterprise Samples\FMStocks7

Note  is a placeholder for the drive where the operating system is installed. Double-click the FMStocks7.msi file, and then follow the steps in the wizard.

Note The installation process generates a set of files that includes an executable (.exe) file that is named Fms.exe. </li> Deploy DCOM on the remote computer:  Verify that the following requirements are met on the remote computer: <ul> Windows XP Service Pack 1</li> Microsoft .NET Framework 1.1</li> Microsoft Internet Information Services 5.1 or later</li> The domain user account that is used to log on to the local computer is added to the Administrators users group of the remote computer</li></ul> </li> Add both the remote computer and the local computer to a single domain.</li> Use the domain user account to log on to the local computer.</li> At a command prompt, locate the \Program Files\Microsoft Visual Studio .NET 2003\Enterprise Samples\FMStocks7 folder.</li> Run the following command:

fms Deploy_Dcom RemoteMachine= Path=  Debug=true

Note  is a placeholder for the name of the remote computer and   is a placeholder for the path on the remote computer to deploy DCOM.</li></ol> </li> Change the value of the userName attribute:  In Windows Explorer, locate the following folder:

%WinDir%\Microsoft.NET\Framework\v1.1.4322\Config

</li> In a text editor such as Notepad, open the Machine.config file.</li> Locate the userName attribute in the processModel tag.</li> <li>Change the value of the userName attribute to System, and then save the Machine.config file.</li></ol>

Note If you change the userName attribute value to System, the server will be vulnerable to attack by malicious users. Therefore, after testing, change the value of the userName attribute back to Machine .</li> <li>Start Microsoft Internet Explorer.</li> <li>In the Address box, type http://localhost/fmstocks7, and then press ENTER.</li> <li>Use the guest user account that appears in the Web browser to log on to the application.</li> <li>Click View Summary.</li></ol>

You may notice the behavior that is mentioned in the &quot;Symptoms&quot; section.

Note This behavior does not occur on a computer that is running Microsoft Windows 2000 Advanced Server or Microsoft Windows Server 2003.

<div class="references_section">