Web Connection
Cannot serve page until I log into machine
Gravatar is a globally recognized avatar based on your email address. Cannot serve page until I log into machine
  Jeff L Roberts
  All
  Dec 20, 2021 @ 05:35pm

After I restart my Server 2019 I get the following error trying to go to a west wind route:

Unknown application error

Retrieving the COM class factory for component with CLSID {D155EF20-D7B1-416A-A0ED-E29F4172C7F0} failed due to the following error: 8000401a The server process could not be started because the configured identity is incorrect. Check the username and password. (Exception from HRESULT: 0x8000401A).

If I log onto the server via RDP, then log into the west wind administration page and then click "Load Servers" then things start working. The West Wind Control Panel also pops up on my desktop.

Under Security I have the following:

Admin Account ANY

Authenticated User ANOVYS\jeff.roberts

Auth Mode NTLM

Server Account SYSTEM

So I think this is probably because it is trying to run as me but can't until I log in. Do I need to just change this user, and if so, how do I do that?

Gravatar is a globally recognized avatar based on your email address. re: Cannot serve page until I log into machine
  Jeff L Roberts
  Jeff L Roberts
  Dec 21, 2021 @ 02:44pm

I got this working by following instructions here to run 32 Bit Version of DCOMCnfg:

https://webconnection.west-wind.com/docs/_4kg0z4g3p.htm

I am wondering if I skipped a step, or if this is standard to need to make these changes when deploying on a server that I don't plan on staying logged into?

Gravatar is a globally recognized avatar based on your email address. re: Cannot serve page until I log into machine
  Rick Strahl
  Jeff L Roberts
  Dec 21, 2021 @ 05:23pm

DCOMCnfg configuration is manual, so if you change accounts you have to do this yourself.

If IIS Application Pool Identity is not configured (through Web Connection configuration or manually) you'll run under ApplicationPoolIdentity which has zero rights and likely can't run the Web Connection COM server at all.

Web Connection's auto configuration by default doesn't register COM server configuration and uses the default pass through security in IIS. This means IIS is set up to use the Application Pool identity - whatever account your Application Pool is set up to run under, which is what I would strongly recommend if at all possible rather than messing with DCOMCnfg. IOW, rather than changing the identity of the COM server, change the Identity of the IIS application which is then inherited by the FoxPro server. This is much easier in terms of configuration and is also the most configuration that you actually want to have for an 'application' where both IIS and your FoxPro server running under the same credentials.

If you must register DCOM for your FoxPro server, the yourApp_ServerConfig.prg file has the following at the end commented out:

*** COM Server Registration
IF IsAdmin() AND FILE("wcdemo.exe")
   RUN /n4 "wcdemo.exe" /regserver

   *** Optionally set DCOM permission - only set if needed
   *** requires that DComLaunchPermissions.exe is available
   * DCOMLaunchPermissions("Testproject2.Testproject2Server","INTERACTIVE")
   * DCOMLaunchPermissions("Testproject2.Testproject2Server","SYSTEM")
   * DCOMLaunchPermissions("Testproject2.Testproject2Server","username","password")
ENDIF

+++ Rick ---

© 1996-2022