Electron Server Installation


(Note: If you have dowloaded files before February 24, 2008 then please download this update distribution of key files (including the main exe.))


First of all, you'll need to download Electron Server. There are a number of different downloads for all supported versions of Delphi listed below:


  Delphi 7 Download

    Zipped Distribution without Delphi Run-time packages (if you are installing to a machine that has Delphi 7 installed).

    Zipped Distribution with Delphi Run-time packages (for installing to a machine that does NOT have Delphi 7 installed).

    Delphi 7 Run-time Packages (to be added to a deployment later if need be)


  Delphi 2006 Download

    Zipped Distribution without Delphi Run-time packages (if you are installing to a machine that has Delphi 2006 installed).

    Zipped Distribution with Delphi Run-time packages (for installing to a machine that does NOT have Delphi 2006 installed).

    Delphi 2006 Run-time Packages (to be added to a deployment later if need be)

        (Note to Delphi 2007 Developers: D2007 is binary compatible with D2006, so you should be able to use D2007 with this package with no problems)


  Samples Download

  Samples with source and documentation for all available versions of Delphi.


Installation Steps

1) Unzip Distribution to the desired directory. Note the location of the directory path to the Electron Server executable, which will be something like "...\ElectronServer2\E2WebServer"

2) For a licensed copy of the product, open the "hosts" file at C:\WINDOWS\system32\drivers\etc\hosts in Notepad.exe.
This file controls your machine's local DNS. Add any Domain Names under the "localhost" line that you wish to associate with a particular IP Address (associated with a given network card, for instance, or localhost itself) e.g.:

      127.0.0.1          localhost
      127.0.0.1          electrondemo
      127.0.0.1          www.mydomain.com


Now "electrondemo" and "www.mydomain.com" domain names will point to the local machine on which the web server is running. So typing "http://electrondemo" is will take you to the same webserver as "http://localhost".

i) NOTE: For installation on VISTA, when updating the HOSTS file: If UAC is enabled, save the HOSTS file to your Desktop. Then, drag and drop the file from your Desktop to C:\WINDOWS\system32\drivers\etc, accepting the UAC dialog when prompted.

4) For a licensed copy of the product, open the DomainMapping.txt file the resides in the "...\ElectronServer2\E2WebServer" directory and configure your local domain names (such as the ones in step 3 above) so that they point to a valid directory. We call this "Domain Mapping". Here is an example of a DomainMapping file:

      localhost=C:\ElectronServer2\E2WebServer\demo_html
      www.mydomain.com=C:\ElectronServer2\E2WebServer\demo_html\spry tests
      electrondemo=C:\ElectronServer2\E2WebServer\e2_site

5) Now open the "E2Webserver.config" in a text editor (notepad.exe will do fine) and you will see something like the following:

    WebServerPort=80
    SSLServerPort=443
    LogToMemo=True
    MemoBuffer=1000
    SeeDebugMsgs=True
    localhost=C:\Working Files\Delphi Projects\ElectronServer2\E2WebServerD7\demo_html
    IPAddress=192.128.100.125

Let's explain the configuration options:

WebServerPort

This is the HTTP port for the web server. The default is "80".

SSLServerPort

This is the SSL port for the web server. The default is "443".

LogToMemo

Toggled "On" will send all logging messages to the embedded Memo in the "Log" tab of the E2Webserver.exe. When toggled "Off", all message will be sent to the custom Logger Plug-in that a developer has the option to install. Note, Electron Server ships with a sample logger plug-in that logs messages to the Windows Event Log. Check it out in the Samples distribution (see the link in the navigation menu of this site).

MemoBuffer

This controls how many lines the Log Memo Buffer can hold before it purges itself and starts over.

SeeDebugMsgs

Developers have the option to create specifically designated "debug" messages. Toggle this option "On" in order to see them, and "Off" when you are not in Debug Mode.

localhost

This option only applies to the Electron Server running in unlicensed mode. When licensed, this option is ignored and all domain names must be mapped via the "DomainMapping.txt" file. Map your localhost domain to a physical directory here. Electron Server will automatically detect where the "demo_html" directory is located under the "E2Webserver" root directory and specify that directory as the localhost mapping. Immediately after installation you should be able to start up Electron Server and type the "localhost" address in your browser and immediately bring up the Electron Server demo website.

IPAddress

Bind Electron Server sockets to a particular IP Address here. Leaving it blank will cause Electron Server to listen to the default IP Address (127.0.0.1).

6) You are ready! Run the Electron Server executable.

OR

7) Run Electron Server as a Windows Service! Here is how:

a) From the command line type: E2WebServer.exe /install

i) Note: To uninstall the service type: E2WebServer.exe /uninstall

b) Go to your Windows Services MMC (Start Up Menu | Administrative Tools | Services)

c) Select the service "Electron Server Web Server" and start the service.

i) Note: If you are running the server in Trial (unlicensed) Mode then you will have to configure the service to interact with the desktop in order to respond to the "Trial Mode" message that pops up when the app starts. To do this, double click the service to bring up the Properties Dialog. Go to the "Log On" tab and select "Allow Service To Interact with DeskTop" check box.

d) Additional Note: Log-Off/Log-On Survivability: When the Electron Server Windows Service is in "Interact with Desk Top" mode, you will be able to log off and back on; and find that the GUI interface hasn't dissapeared (as opposed to many applications out there where the window handles of the Application's Main Form are destroyed.

e) Security Note: We recommend that developers use the "Interact with Desktop" service option with care for testing only. We remind you that this is an UNSECURE method of using a windows service, and you should never allow this on a production server accessible to the public internet. Electron Server ships with the ability to run as a windows service; but NOT automatically in "Interact with Desktop" mode "out-of-the-box". This is a deliberate choice each developer will have to make for himself, and a deliberate action by each developer will need to be taken to enable this option.

f) Security Recommendation: For deployment to a production server, create a special windows user account with the bare minimum user access rights; and, then from the Service MMC Service's Property Dialog, Log-On Tab, you can indicate the special account (with password) under which to run your Electron Server service.