Installing Your Web Application

Once the DataFlex Web Application Server is installed, you need to install the files needed by your application.

This may include any or all of the following:

Installing Application Files

Creating a Web Share (Virtual Directory)

Creating and Setting Registry Settings

Adding the Web Application to the Web Application Administrator

The best way to simplify application installation is to mirror the workspace setup of your development environment on the deployment PC. If you need to change the workspace setup to be different than on your development PC, you will have to modify the workspace (.ws) file installed with your application.

Installing Application Files

Generally, files in the apphtml, data, and programs folders of a Web application workspace are deployed. So, your deployed workspace's folder structure should look like this:

\Workspace

    \apphtml

    \data

    \programs

The files listed below are only those created by the DataFlex development tools when building a DataFlex application. If your application uses additional files, you must deploy these as well.

AppHTML Folder

Data Folder

Depending on the database you are using, the required files may vary. If you are using databases in your application other than the embedded (DataFlex) database, please consult the documentation for those databases and drivers about additional files that may need to be distributed.

Embedded (DataFlex) Database

filelist.cfg, *.dat, *.hdr, *.k??, *.tag, *.vld (if present)

Pervasive.SQL

filelist.cfg, *.btr, *.int, *.ddf, codemast.*, codetype.*

Microsoft.SQL

filelist.cfg, *.mdf, *.int, codemast.*, codetype.*

Programs Folder

webapp.exe - compiled Web application file

*.ws - workspace file(s)

You must install the workspace (.ws) file for your workspace in the same folder where your compiled program (.exe) resides, unless you specify the path to this file in your application.

Creating a web share (Virtual Directory)

An Internet Information Server (IIS)-based Web Application requires a virtual directory (sometimes called a web share) to run in. This is the second part of the path that is used to access a Web Application:

http://ServerName/VirtualDirectoryName/Index.html

For example, the DataFlex Order Entry Web Application typically uses this URL to be accessed:

http://localhost/WebOrder_<rev>/Index.html

where WebOrder_<rev> is the name of the virtual directory this sample application runs in.

In most cases you will create the web share automatically as part of configuring the web application in the Web Application Administrator described below. But you can also create the web share programmatically. To help create virtual directories programmatically, a program named dfmanagevdir.exe is installed in the bin folder.  It accepts parameters for creating or removing virtual directories.

dfmanagevdir create <website> <vdir> <path> /overwrite

where:

For example, the command to create the virtual directory for the WebOrder_19_1 sample application in the default website would be:

"c:\program files\DataFlex <rev>\bin\dfmanagevdir.exe" "" "WebOrder_20_1" "C:\DataFlex 20.1 Examples\WebOrder\AppHTML" /overwrite

Creating and Setting Registry Settings

All Web Application Server-specific and utility-specific Registry settings are installed by the Server installation.

If there are Registry settings required for your application, you must install them as part of your application installation.

Adding the Web Application to the Web Application Administrator

There are 2 ways you can register a DataFlex Web Application for the Web Application Administrator (and the DataFlex Web Application Service):

Via the DataFlex Web Application Administrator

Select File -> New Web Application Configuration and follow the steps outlined by the New Web Application Configuration wizard. The wizard is the easiest way to configure the web application, it can also automatically creates the web share (virtual directory).

By installing the required Registry settings for the application

For each Web Application, a set of Registry settings needs to be installed. A Registry key with the Web Application Name must be installed into the key:

HKey_Local_Machine\Software\Data Access Worldwide\DataFlex\<rev>\WebApp Server\Web Applications  <- For 64-bit applications

 

HKey_Local_Machine\Software\Wow6432Node\Data Access Worldwide\DataFlex\<rev>\WebApp Server\Web Applications  <- For 32-bit applications

For example, the Registry key for the Order Entry sample application is:

HKey_Local_Machine\Software\Data Access Worldwide\DataFlex\<rev>\WebApp Server\Web Applications\Order_Entry

 

HKey_Local_Machine\Software\Wow6432Node\Data Access Worldwide\DataFlex\<rev>\WebApp Server\Web Applications\Order_Entry

You need to install a number of Registry values into the Registry key for your web application. When you are finished, the Registry values for your web application should look like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Data Access Worldwide\DataFlex\20.1\WebApp Server\Web Applications\WebOrder]

"ProgramPath"="C:\DataFlex 20.1 Examples\WebOrder\Programs\WebApp.exe"

"LogFile"="C:\DataFlex 20.1 Examples\WebOrder\Programs\WebApp.log"

"LogAccess"=dword:00000000

"Disable"=dword:00000000

"MaxLogEntries"=dword:000001f4

"OperationMode"="Local"

"UseConnectorPool"=dword:00000001

"MinPool"=dword:00000002

"MaxPool"=dword:00000005

"ProgramParameters"=""

"PurgePoolInterval"=dword:00000006

 

 

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Data Access Worldwide\DataFlex\20.1\WebApp Server\Web Applications\WebOrder]

"ProgramPath"="C:\DataFlex 20.1 Examples\WebOrder\Programs\WebApp.exe"

"LogFile"="C:\DataFlex 20.1 Examples\WebOrder\Programs\WebApp.log"

"LogAccess"=dword:00000000

"Disable"=dword:00000000

"MaxLogEntries"=dword:000001f4

"OperationMode"="Local"

"UseConnectorPool"=dword:00000001

"MinPool"=dword:00000002

"MaxPool"=dword:00000005

"ProgramParameters"=""

"PurgePoolInterval"=dword:00000006

After you have installed the Registry settings for your web application, the DataFlex Web Application Server Service will immediately start the application if the service is running or it will automatically start the application the next time the service is started (after a reboot, for example).

DF_Collate.cfg Special Note

When deploying applications which use a collating sequence other than the one used for the English language, it is critical that the df_collate.cfg file for the language you select is deployed to the Bin folder of the Client or Server installation.

See Also

Deploying Web Applications