How to Configure and Publish an Alpha Anywhere Application to a server Using HTTP Publishing
A step-by-step guide to configuring the Alpha Anywhere Application Server and publishing profile to publish your Alpha Anywhere Application using HTTP publish.
This tutorial describes how to configure the Alpha Anywhere Application Server for HTTP publishing and how to create the corresponding publishing profile to publish a web application using HTTP Publish.
To publish to a remote server using HTTP publishing, the following conditions must be met:
- The Alpha Anywhere Standard Application Server is installed and running on the remote server.
- Access to the remote server to configure the Application Server to allow HTTP publishing (if the Application Server has not been previously configured.)
Before you can create an HTTP Publishing profile, the Alpha Anywhere Application Server must first be configured to allow HTTP Publishing. This section requires that the Alpha Anywhere Application Server is installed on the server and that you have access to modify the server's settings.
These instructions can also be used to configure the Development Server to allow HTTP publishing.
For additional details, watch the video "Configuring the Web Application Server for HTTP Publish" listed in Appendix C: Videos.
Open the Server Settings.
If you are using the development server, open the Development Server Settings. In the Alpha Anywhere Development environment, navigate to the Web Projects Control Panel. Open the Web menu and select Development Server.
If you are using the Alpha Anywhere Application Server, launch the Application Server if it is not already running. Then, double-click the system tray icon to open the Server Settings dialog. Alternatively, you can right-click the system tray icon and select Configure Server from the context menu to open the Server Settings.
Navigate to the HTTP Publish Settings. Click the Other tab.
Before HTTP Publish can be configured, HTTP Publish must first be enabled. Check the Allow HTTP Publish? check box.
To continue with HTTP publish configuration, the changes need to be saved. Click the Save button.
Click OK to close the confirmation dialog.
Next, optionally specify the folder where the data should be published on the server. If this value is left blank, data will be published in the same directory as the configuration XML file for the server.
Next, you need to configure the HTTP Publish Permissions. The HTTP Publish Permissions control who can and cannot publish to the server. You can also specify file restrictions to disallow certain file types from being published to the server.
Click the Set HTTP Publish Permissions button to open the Configure HTTP Permissions dialog.
In the Configure HTTP Permissions dialog, click Enter New User to create a new user account.
Enter the User name. The User Name must be between 6 and 40 characters in length and may only contain Numbers and Letters.
Enter the Password for the user account. The password must be between 6 and 20 characters in length and only contain letters and numbers. The Password must also contain one lowercase letter, one uppercase letter, and a number.
Next, you need to assign the Folder permissions for the User account. Click the Add link to add folder permissions.
The Folder permissions define the folders files can be published to by the user account using HTTP publish. A user account can have access to any directory in the webroot or one or more specific folders. In addition, you can also explicitly deny publishing to specific folders or the entire webroot by unchecking the Allow Publish? checkbox for the selected folder.
For this example, we will create a user with full access to the webroot. Select <webroot> from the dropdown box. Make sure Allow Publish? is checked and click OK.See Appendix A: Configuring User Publishing Permissions for tips on defining user access.
The user profile is now configured to allow publishing to the server's webroot, including any folder in the webroot. Click OK to save the User profile.
In addition to configuring user publishing permissions, you can also restrict the types of files published using HTTP publishing. Click the Restricted File Types link to open the Restricted File Types dialog.
In the Restricted File Types dialog, you can define a set of file types that cannot be published to the server. Select the file types from the list provided or add your own types using the Add Type link. Files that are restricted from HTTP publishing cannot be uploaded to the server.
Optionally, select on or more file extensions, adding your own as desired, to restrict from HTTP publishing. Click OK to save the settings.
Click OK to save the HTTP Publish Authorization configuration.
If the Application Server is running, you must restart the server to apply the new HTTP Publish configuration. Click the Restart Server button to restart the server.
If the server is not running, you must start the server in order to publish a web application to the server using HTTP publish. Click Start Server to start the server.
Close the Server Settings dialog when the server has finished starting or restarting.
Now that the Alpha Anywhere Application Server is configured to allow HTTP Publishing, you can create a publishing profile to publish your web application to the server.
The Publishing Profile describes where web application files will be published in the Application Server's webroot, either locally or on a server. During the publishing process, the project files for the web application are compiled and copied to the webroot for the Application Server. This section describes how to configure a project to publish an application to a server running the Alpha Anywhere Application Server that has been configured to allow HTTP publishing.
From the Web Projects Control Panel, open the Web menu and select Project Settings... to open the Web Project Profiles dialog.
Click Add New Profile to create a new publishing profile.
Select HTTP and click Next
Enter the Server URL. The server URL should be an http or https address. If the server uses a port other than port 80 (http) or port 443 (https), you must include the port number in the URL.
Click Test URL to test the URL. If the test fails, check to make sure the Alpha Anywhere Application Server is running and test the URL again.
Next, enter the User Name, Password, and Target folder. This is user name and password for the user account you created in Configure the Application Server to Allow HTTP Publishing.
The Target Folder is the location in the server's webroot where the files will be published. If no folder is specified, files will be published directly to the webroot.The user must have permissions to publish to the specified target folder. If no folder is specified, the user must have permissions to publish to the server's webroot.
Test the HTTP Login credentials to verify they are correct. Click the Test HTTP Login button. If the test fails, verify that the user has permissions to publish to the specified target folder. Re-enter the user credentials and run the test again.Test HTTP Login does not validate if the user has permissions to publish to the specified Target Folder.
Click Finish to create the HTTP publishing profile.
When prompted, enter a name for the profile. Choose a name that identifies this profile as a publishing profile to the server.
Next, you need to configure any Aliases, Alpha DAO connection strings, Named Resource Providers, and Web Socket Settings that are required by the web application.
Select the publishing profile you just created.
If your web application uses Aliases for paths and connection strings, you must define the published Aliases that will be used by the web application. Aliases are defined relative to the server file system. Click the button for Aliases to define the paths relative to the server for published Aliases. This is where you can define the [PathAlias.ADB_Path] alias for the data folder.
If your web application uses any Named Alpha DAO connection strings, you must define the AlphaDAO Connection strings the server will use. In a typical development environment, Named AlphaDAO connection strings will reference a database running on the development system. When published, the Named AlphaDAO connection strings must be modified to reference the production database that will be used by the published application. If your application uses DBF databases, the Named AlphaDAO connection strings must reference the published DBF files on the server.
Connection strings are defined relative to the server. Click the button for the Named AlphaDAO connection strings property to define the connection strings that will be used by the web application when published to the server.You MUST define the published connection string for any Named AlphaDAO connection strings used by your application.
If your application uses Named Resource Providers, define the Named Resource Providers relative to the server. Click the button for the Named Resource Providers property to define the named resources.
If your application uses Web Sockets, configure the Web Socket Setting for the publishing profile. Click the button for the Web Socket Settings property to define the web socket settings for the server.
Define or adjust any other settings required in the publishing profile. You can come back to the Web Project Profiles dialog at any time to make adjustments if you find that a setting is missing or incorrect.
Click OK to save your changes and close the Web Project Profiles dialog.
If your application uses Named Alpha DAO connection strings and you did not define the published connection strings in the Publishing Profile, you may see the error message below. Click Edit AlphaDAO Connection Strings Now to define the connection strings for the Named Alpha DAO connection strings used by your application. Your published application may fail to work if you do not define the published connection string for the Named AlphaDAO connection strings.
If your application does not use any of the Named AlphaDAO connection strings to connect to data sources, you can ignore this message.Named AlphaDAO connection strings must be defined to reference the production data source in a published application.
Now that you have configured the publishing profile, the next step is to publish your application and open it in a web browser.
Alpha Anywhere web applications are deployed using the Publish Web Project dialog. Applications can be published locally on your development machine or to a server. In addition to deploying your project, publishing is also a useful tool for testing your application. Testing can be done locally on the development machine or on a server. The following instructions explain how to publish to the server using the publishing profile you just created.
The Publish Web Project dialog is used to configure what is published to the destination defined by the publishing profile.
Select the publishing profile you created from the Select profile dropdown. Select the All files in project option to publish all files in the project. Check the boxes for Publish Web Project files and Publish new or modified files only.
If your application uses Reports defined in the Control Panel - not as separate .a5rpt files - check the box for Publish Workspace Library (contains SQL Report definitions).
If your application has functions defined on the Control Panel (this is separate from the Web Projects Control Panel, check the box for Compile functions into an .AEX file?.
If your application uses Web Security, publish the Web Security files. Select Publish Data Tables -- Publish security tables. from the Publish Web Security Data dropdown box.You only need to publish the Web Security tables once to your server. Once the tables have been published, choose Ignore -- Do not publish security data. on subsequent publishes to the server.
If the server is a testing server to which you will be making frequent changes, optionally check Save these settings as your Quick Publish settings. You can Quick Publish your project by clicking the Quick publish project link below the left column on the Web Projects Control Panel.
Click the Publish button to being publishing the web project to the server.
Alpha Anywhere will display the list of files to publish in the Files to be Published dialog. This dialog is for informational purposes only. While you can edit the text in the dialog, it does not change the files published to the server.
Click OK to continue.
Alpha Anywhere will display a notice when publishing is complete. Click OK to close the notice.
To view your published application, open the web browser and type in the address for a page that was published. The address is a combination of the Base URL and page name.
The Base URL for an application published using HTTP Publish is a combination of the Server URL and the Target Folder.
For example, if the Server URL is http://www.myapp.com and the web project was published to a Target Folder called app1 in the webroot, the Base URL for the published application would be:
If the target web server doesn't use port 80 (http) or 443 (https), you must also remember to include the port number (which should already be included in the Server URL for the HTTP Publish profile.) The image below is an example of a Server URL that contains a port number.
The configuration shown is for connecting to the Development server for HTTP publishing. The Development server is configured to listen on port 8080. The Server URL for connecting to the Development server is http://localhost:8080.
The HTTP publishing configuration also includes a Target Folder, HttpPublishTest.
Both the Server URL and Target Folder are combined to form the Base URL for the application: http://localhost:8080/HttpPublishTest. Using the Base URL, you can access the pages published to the server from a web browser. For example, if you wanted to view the published "testPage.a5w" for the web application, you would open a web browser and type the following into the address bar:
You can also specify a page open in the default web browser after publishing completes in the Publish Web Project dialog. Check the box for Launch browser after files are published and select the page to display from the Page to show dropdown box. When Alpha Anywhere finishes publishing the application, the web browser will be launched and the specified page will be shown.
HTTP Publishing Permissions define what folders a User has permissions to upload or "publish" files from Alpha Anywhere. A user can be granted full access to the entire webroot or individual folders in the webroot. Users can also be expressly denied publishing permission to specific folders or the entire webroot.
A user account has full publishing access if they have permissions to publish to the webroot. To configure access to webroot publishing, you must add the webroot folder with Allow Publish enabled. The configuration is listed below:
- Allow Publish?
A user that has permissions to publish in the server webroot can create new directories when publishing an application to the server.
Granting restricted publishing permissions can be done by specifying one or more specific folders in the webroot. For example, if you wanted to restrict a user account such that they could only publish to a directory called "AppB" in the webroot, you would configure the folder settings as follows:
- Allow Publish?
The folder does not need to exist on the server when specifying publishing permissions. The folder will be created when files are published to the server.
Restricting publishing to specific folders both prevents you from overwriting applications that may have been published to other directories on the application server and guarantees that files will only be published to a specific directory in the webroot. A user account that has access to an explicit folder cannot publish to any other folder in the server's webroot.
In addition to restricting publishing to one or more folders in the webroot, you can also deny publishing to any folder on the server by disabling Allow Publish? for a folder or the entire webroot. For example, the following configuration denies publishing to any folder on the server:
- Allow Publish?
Disabling publishing is useful if you want to temporarily disable publishing for a user account without losing authentication information.
The Alpha Anywhere Standard Application Server can be used to create and verify the published connection string(s) needed by the application. On the Other tab in the Application Server Settings, the Open the Connection String Builder Genie link opens a dialog that can be used to create and test a connection string on the server to verify the connection string is valid before adding it to the publish profile. To learn more, see How to Test Connection Strings on the Application Server.
Configuring the Web Application Server for HTTP Publish
When publishing applications to a server, you can choose to use FTP or HTTP to do the file transfer work. The HTTP Publish option provides more options than FTP, including the ability to restrict who can publish to the server and restrict the types of files that can be uploaded. This video explains how to configure the Alpha Anywhere Application Server to allow HTTP publishing.
Creating an HTTP Publishing Profile
A Publishing Profile defines how web applications are published to a server. There are several ways an application can be published to a server, including HTTP. This video explains how to create an HTTP Publishing profile in Alpha Anywhere to publish a web application to a server configured to allow HTTP publishing.