Once you've developed your application and you've tested and debugged it on your development machine, the next step is to take that application online.
Summary:
- Install the Visual FoxPro runtime files for an EXE based COM server (see VFP docs for files required)
- Copy your application files (EXE, data files, DLLs, other support files)
- Copy your Web HTML and image files
- Run the Server Configuration Wizard
Copying files to the server
This process involves moving the application and HTML files to the Web server. This is a manual process that you need to perform on your own and will vary depending on your application.
This can involve installing from an installer, simply copying files to a server or FTP'ing files to a server.
Note that a first time installation requires someone at the server to run the installation.
The following need to be moved to the server:
- Visual FoxPro Runtime
In order to run Web Connection the Visual FoxPro runtime needs to be installed on the server. Usually you'll use a custom installer to do this or you can manually copy the files. For details see the FoxPro documentation. - Application files
Application files are your applications EXE file along with data files and other dependency files that your application needs. This is the equivalent of the WCONNECT install directory when Web Connection is installed, but it's not necessary to run the full Web Connection setup to do this. YourApplication.exe
YourApplication.ini
- Web Connection Dependencies
The following two are dependencies of your main application.
wwIPStuff.dll
zlib.dll
wwImaging.dll (required only if you use the imaging function in wwAPI)msvcr71.dll (for Apache only. should be copied into the System directory if it doesn't exist)
- Management Console and dependencies
If you plan on using the Mangement Console to configure your server either in command line or interactive mode you need to copy the CONSOLE.EXE and a couple of support directories and files:
Console.exe
.\SCRIPTS
.\TEMPLATES
.\TOOLS\DComPersmissions.exe (can go into the main directory)
- HTML Web Files
You also need to move your HTML and Web related files to the Web server. These files include HTML files, style sheets and so on. This usually also includes a copy of wc.dll and wc.ini in the \BIN directory.
Project Creation considerations
When you create a new project, especially using the
New Project Wizard, the Wizard creates both the project file in the application directory and some startup HTML files in a Web directory. It's generally a good idea to let the Wizard create a copy of wc.dll into your project's BIN directory. This will allow you to use the DLL independently of an existing Web Connection installation which requires wc.dll in the /wconnect virtual directory.
Use the script maps
The New Project Wizard also creates a scriptmap for your application automatically - it's highly recommended that you use that scriptmap extension instead of referencing the DLL directly so that the application is more portable.
Tip!
Whenever possible try to set up your project in such a way that it mimicks the final setup on the server. Use the same directory structures and data paths for example. Although this is not required this setup can make it much easier to fix problems and synchronize a development and live installation. Always make sure that all paths (both application and Web paths) are relative to some base path or the current path. This will ensure your application is portable when moved to different directory.
Take note early on on how the application will be run on the server. For example, your app may be designed in a
- Web Root Directory
- Virtual Directory
The Project Wizard tends to set up applications in a virtual directory, but you can easily move the application to the root if you choose. You can run applications either out of the virtual or the root if you keep to strict relative pathing for images and other related file! Don't hardcode paths or your app will not be portable!
Copying files
Ok, once the app is running on a development box it's time to move it to the server. This involves copying the application and HTML files. For Web files you have to copy all of your HTML files and images and other files that are located in the Web paths.
For application files again copy all files that are related to your project including the executable and data files. In addition copy the following:
- Your application's EXE file and its associated INI file.
- CONSOLE.EXE from the Web Connection installation directory.
- WWIPSTUFF.DLL - required for parsing form variables etc.
- ZLIB1.DLL - required for GZIP compression.
- The SCRIPTS and TEMPLATES directories from the Web Connection installation directory
- The DCOMPermissions.exe file from your TOOLS directory for the Server Configuration Wizard.
Create a Temp directory
You also need to create a temporary directory where Web Connection looks for message files in file based message mode and writes error log entries for any operational mode.
This directory needs to be accessible to the SYSTEM account (or whatever account your Web Server is running under) with full access.
Run the Server Configuration Wizard
Run the Server Configuration Wizard
on the server and set up any virtual directories, script maps to your web connection DLL and register your server as a COM object on the remote machine. Please see,
Server Configuration Wizard for more info.
COM Server Configuration
The easiest way to configure your COM server is to run the Management Console and use the
Configure COM settings step to automatically configure your server for DCOM configuration. You can also perform these steps
manually, but I'd highly recommend you use the Wizard since it does the job quicker and more reliably.
See also
Server Configuration Wizard |
Manual COM Server Configuration