Running Web Connection without an NT logon


Running Web Connection as a Service or prior to NT Logon

Symptom: I'm trying to run Web Connection as a Service or at least run it so that no user needs to be logged on.

One topic that frequently comes up is how to set up Web Connection so that servers automatically start when the system boots up. Under NT most people want WC to run as a service as a result of that. While it is possible to run WC as a service (using the NT ResKit's SvrAny program) I don't recommend this operation because the server cannot be controlled using the Web Connection server management features.

However, there are other more efficient ways to accomplish this task. Depending on whether you run Automation or File based there are several mechanisms available:

COM Operation

When running Automation, Web Connection brings up Automation servers automatically when a link that requires a WC server is hit. The trick is to properly configure the Automation server for the environment it's running under. The following suggestions only apply to NT - under Windows 95 there's no security on Automation servers and they will always start automatically.

If you're always logged on under NT
If you're logged on under NT you should configure your Automation server to the Impersonate the Interactive User using the DCOMCnfg options (as described in OLE Automation Setup). Using this account allows the best operation of WC Automation servers that live visibly on the NT Desktop.

AutoLogon to NT
A simple way to allow proper operation of WC is to use the above settings and force NT to automatically log in at boot up. You can use the NT Resource Kit to set this up or set the following registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

AutoAdminLogon	REG_SZ       1 - AutoLogon   0 - Manual Logon
DefaultPassword	REG_SZ       The accout password
DefaultUsername	REG_SZ       The account name  

Running without an NT Logon
Automation servers can run without having an NT logon. In order to do so you need to configure the server to impersonate a specific user account via settings in DCOMCNFG. This user should have rights to access your data directories, TEMP and any remote SQL or network connections that your app may need (since this user is tied to your server it's OK to use an Admin account here!). Select your specific server within the DCOMCnfg and click on the Identity tab. Choose This User: and enter a valid account and password. I recommend you use an Admin account so you have full access to the machine/network via the Automation server. You can also use the Launching User account which would be IUSR_. However, this account has limited rights and may not be able to access some resources (files, registry or network) that might be required by your application and I don't recommend giving this account extra rights to access these resources.

Note: When your server is configured as using a specific account or Launching User the Web Connection server runs invisibly regardless of the Interact with Desktop flag of the Web service.

File Based

When running file based servers do not start up automatically as the Web Connection servers are standalone Visual FoxPro applications.

AutoLogon to NT and Startup Group entries
The easiest way to force WC servers to start up is to use Autologon (as described above) and server entries in the startup group. When the machine boots the startup group fires off servers automatically.

The StartFileInstances flag in wc.ini
You can automatically start Web Connection server instances the first time a call to wc.dll is made by specifying the following two keys in wc.ini:

   ExeFile=c:\wwapps\wc2\wcdemo.exe
   FileStartInstances=2

Servers started in this fashion can be auto-started before NT logon, but the servers will run invisibly. When you do log on the servers will become visible.


Last Updated: 05/04/00