Show: Delphi C++
Display Preferences

Installing the EMS Server or EMS Console Server on a Production Environment

From RAD Studio
Jump to: navigation, search

Go Up to Setting Up Your EMS Server

Go Up to Setting Up Your EMS Console Server


For a production environment, we recommend to set up the EMS Server and the EMS Console Server on a web server. We currently support Microsoft IIS Server and Apache Server.

You need the InterBase database and configuration file (.ini). To create these files for the first time follow the steps in Configuring Your EMS Server or EMS Console Server.

Note: If you have an EMS license to install InterBase XE7 encrypted database in your production environment, you need to first follow the steps in EMS Database Requirements for a Production Environment.

The default path to the EMSServer.IB and EMSServer.ini files is:

  • C:\Users\Public\Documents\Embarcadero\EMS\
Note: Edit the ini file with the location to the database after creating it. Check that InterBase server is running.

Locating Binary Files that EMS Server Requires

To run the EMS Server in a different machine from the one you installed RAD Studio, you need the following files that you can find in the installation folders of the dlls:

For Microsoft IIS Support (Windows ISAPI):

  • borlndmm.dll
  • CustomIPTransport240.bpl
  • dbrtl240.bpl
  • EMSConsole.dll
  • EMSServer.dll
  • emsserverapi240.bpl
  • FireDAC240.bpl
  • FireDACCommon240.bpl
  • FireDACCommonDriver240.bpl
  • rtl240.bpl
  • FireDACIBDriver240.bpl
  • IndyCore240.bpl
  • IndyIPClient240.bpl
  • IndyIPCommon240.bpl
  • IndyProtocols240.bpl
  • IndySystem240.bpl
  • inet240.bpl
  • vcl240.bpl
  • vcldb240.bpl
  • vclFireDAC240.bpl
  • vclx240.bpl
  • xmlrtl240.bpl
  • If you use FireDAC with a database management system other than InterBase, you need its FireDAC driver, such as FireDACSqliteDriver240.bpl for SQLite.

For Apache Server Support:

  • FireDACCommon240.bpl
  • FireDACCommonDriver240.bpl
  • FireDACIBDriver240.bpl
  • FireDACSqliteDriver240.bpl
  • IndyCore240.bpl
  • IndyIPClient240.bpl
  • IndyIPCommon240.bpl
  • IndyProtocols240.bpl
  • IndySystem240.bpl
  • inet240.bpl
  • mod_emsserver.dll
  • rtl240.bpl
  • xmlrtl240.bpl

If you have created one or more packages of custom EMS resources, you must build them into package shared library files, which you need as well.

Microsoft IIS Support (Windows ISAPI)

The dlls to configure both the EMS Server and EMS Console running on an IIS Server (EMSServer.dll and EMSConsole.dll) are located in the following folders:

  • Windows 32 bits: C:\Program Files (x86)\Embarcadero\Studio\18.0\bin
  • Windows 64 bits: C:\Program Files (x86)\Embarcadero\Studio\18.0\bin64

Follow these steps to set up your EMS Server or Console running on a IIS Server.

Installing IIS 7

  1. Go to Control Panel > Programs and Features > Turn Windows features on or off.
    Note: This requires Privileged mode.
  2. Expand the Internet Information Services node of the Windows Features dialog box and then:
    • In Web Management Tools, check IIS Management Console.
    • In World Wide Web Services, expand the Application Development Features and then check ISAPI Extensions and ISAPI Filters.
    • In World Wide Web Services, expand the Common HTTP Features and make sure that Default Document, Directory Browsing, HTTP Errors, and Static Content are checked as well.
  3. Click OK to start the installation.

Checking IIS 7

  1. After installing IIS 7, open the URL http://localhost/ with a regular browser to make sure IIS is running and working.
    Note: You might need to check your firewall settings and add an exception for port 80 TCP traffic if necessary.

Creating a New Site

Add a new site:

  1. Go to C:\inetpub\wwwroot and create a new folder, for example emsconsole or emsserver.
  2. Paste the created EMSServer.ini file in Configuring Your EMS Server or EMS Console Server (default location is C:\Users\Public\Documents\Embarcadero\EMS\) on the folder.
  3. Copy the required binary files into the folder.
  4. (Only for the EMS Console) Copy the webresources folder from C:\Program Files (x86)\Embarcadero\Studio\18.0\ObjRepos\en\EMS to C:\inetpub\wwwroot\emsconsole.

Configuring EMSServer.ini File (only for the Console)

Edit the EMSServer.ini file as follows:

[Console.Paths.ISAPI]
ResourcesFiles= C:\inetpub\wwwroot\emsconsole\

Note: You need to restart the IIS Server for the changes to take effect.

Configuring IIS 7 for the ISAPI DLL

  1. Open Internet Information Service Manager (requires Privileged mode).
    Tip: Enter Inetmgr on Search programs and files to open the IIS Manager.
  2. Select the folder (emsserver or emsconsole) under Sites > Default Web Site.
  3. Double-click Handler Mappings. This opens the Handler Mappings window.
  4. Select ISAPI-dll. It appears grayed.
  5. Click Edit from the Actions panel.
  6. On the Executable (optional) field enter the path to the dll file and click Open:
    • emsserver.dll, for example C:\inetpub\wwwroot\emsserver\emsserver.dll
    • emsconsole.dll, for example C:\inetpub\wwwroot\emsconsole\emsconsole.dll.
  7. Click OK, then click Yes.
  8. Click Edit Feature Permissions… in Actions panel.
  9. An Edit Feature Permission dialog opens.
  10. Check Execute.
  11. Click OK to commit the changes.

Enabling ISAPI Modules

  1. Click the root node from the Connections tree.
  2. Double-click ISAPI and CGI Restrictions.
  3. Click Edit Feature Settings … in the Actions panel.
  4. Check the Allow unspecified ISAPI modules option. This option allows any ISAPI dll to be executed under IIS. If you do not use this option, you need to specify a list of ISAPI DLLs explicitly.
  5. Click OK.

Enabling 32 bits ISAPI DLL on IIS 7 x64

This is only required if you are using IIS 7 x64 and you would like to run 32 bits ISAPI DLL on the IIS. If your ISAPI DLL and IIS7 are both x86 or both x64, you may skip this step.

  1. Click Application Pools node.
  2. Click DefaultAppPool item.
  3. Click Advanced Settings … from the Actions panel.
  4. An Advanced Settings dialog opens.
  5. Set Enable 32-bits Applications to True.
  6. Click OK to commit the changes.

Configuring IIS to Allow Cross Domain Requests

If your Web Server is hosting the Web files resources of an EMS Console Server and you want to allow HTTP requests from different domains, you need to set up the HTTP-Response-Header.

  1. Go to C:\inetpub\wwwroot and create a new folder, for example Web files folder.
  2. Paste the web files resources folders under webfilesresources.
    Note: You can not change the webresources folder name.
  3. Open Internet Information Service Manager.
  4. Select the Web files folder (webfilesresources) under Sites > Default Web Site.
  5. Double-click HTTP Response Headers.
  6. Click Add in the Actions panel.
  7. Enter one of the following configurations (Name: Value):
    • Access-Control-Allow-Origin: *
    • (More restrictive option) Access-Control-Allow-Origin: http://domain:port/
  8. Click OK to commit the changes.


Note: See Hosting the EMS Console Server Web Files Resources in a Web Server for more information about it.

Apache Server Support

You can find the EMS Apache server module (mod_emsserver.dll and the mod_emsconsole.dll) in the following locations:

  • Windows 32 bits: C:\Program Files (x86)\Embarcadero\Studio\18.0\bin
  • Windows 64 bits: C:\Program Files (x86)\Embarcadero\Studio\18.0\bin64

Follow these steps to set up your EMS Server or Console running on an Apache Server.

  1. Download and install Apache HTTP Server for Windows.
    Note: EMS Server only runs in Apache HTTP Server versions 2.0, 2.2, and 2.4.
  2. Copy the EMS Apache server module (mod_emsserver.dll) or the EMS Apache console module (mod_emsconsole.dll) to a location:
    • For example, you can create the C:/mod folder.
  3. Configure the Apache HTTP Server to load the EMS Apache server and EMS Apache console modules. Edit the httpd.conf file.
    • Add the following line to load the EMS Apache server module (mod_emsserver.dll)
     LoadModule emsserver_module C:/mod/mod_emsserver.dll
    
    • Add the following line to load the EMS Apache console module (mod_emsconsole.dll)
     LoadModule emsconsole_module C:/mod/mod_emsconsole.dll
    
    Note: According to the Apache Documentation, add the '_module' suffix to the module name; Otherwise, Apache does not load the module.
    • Add the Location tags to create a container where you can specify access control rules for a given URL.
     <Location /ems-server>
       SetHandler mod_emsserver-handler
     </Location>
    
     <Location /ems-console>
       SetHandler mod_emsconsole-handler
     </Location>
    
  4. Change the Listen to change the default listener port. For example, change it to 8085.
    Listen 8085
  5. (Only for the EMS Console) Copy the webresources folder (from C:\Program Files (x86)\Embarcadero\Studio\18.0\ObjRepos\en\EMS) to the folder where you copied the Apache modules dlls (C:/mod).
  6. To check if the EMS Apache server module is properly running, open a web browser and type: http://localhost:8085/ems-server/version
  7. You can access the EMS Apache console module by accessing: http://localhost:8085/ems-console/

Configuring EMSServer.ini File (only for the Console)

Edit the EMSServer.ini file as follows:

[Console.Paths.Apache]
ResourcesFiles = C:\mod\
;WebFiles =

Note: You need to restart the Apache Server for the changes to take effect.

See Also

Personal tools
In other languages
Previous Versions
Assistance