Wednesday, May 27, 2009

Setting up an AIS Connection

Advantage has three connection types. Local (ALS) for the embedded server, Remote (ADS) for the client-server product and Internet (AIS) which includes encryption and compression when connecting to the client-server product. The AIS connection type is typically used when connecting across the Internet without using a VPN.

There are several configuration steps you must do to use an AIS connection type. These steps are listed below:

  1. Configure the Internet port on the Advantage Database Server
  2. Open the specified port on the firewall
    1. Advantage uses UDP/IP by default
    2. Clients can be configured to use TCP/IP see the help file for more information.
  3. Configure an Advantage Data Dictionary (ADD) for Internet access
  4. Create users with Internet access
  5. Add the INTERNET_IP and INTERNET_PORT settings on the client(s)
  6. Add a drive letter mapping for the client(s) to use

Configure the Internet Port

Use the Advantage Configuration Utility to specify which port Advantage will use when accepting AIS connections. If this port is set to 0 then connecting to the Advantage Server from the Internet is disabled. The Internet Port setting is located on the Configuration –> Communications tab.

Internet Port Configuration

Another consideration when connecting to Advantage with an AIS connection is latency. Response times across the Internet will be much slower than on a typical LAN and response times can vary depending on usage. The Advantage server will automatically disconnect clients that are not actively communicating with the server. To reduce the risk of an client connected across the Internet from getting disconnected you may need to adjust the Internet Client Timeout value on the server.

Configure Firewall Settings

Firewall configuration is specific to the firewall that you are using in your environment. Ensure that the port you specified in step one is open through the firewall for traffic in and out of the network. The default protocol is UDP/IP, however, the server can communicate via TCP/IP as well.

Clients will need to be configured to use TCP/IP communications. This can be specified in the ADS.INI file by setting the USE_TCP_IP setting to 1. Several clients also have a Communication Type option.

Configure an ADD for Internet Access

An ADD is required when connecting to Advantage using the AIS connection type. The ADD is used to authenticate the users when establishing the connection. You can still access any free tables which are in the same directory with the dictionary but I recommend that you use dictionary bound tables when possible.

You can choose from three levels of security; no authentication, authenticate and authenticate with encryption. You can also specify the maximum failed login attempts which allows the user the specified number of tries before locking them out of the dictionary. A database administrator must reset any locked out users.

Dictionary Internet Access

Create Users with Internet Access

Since the dictionary is used to authenticate users when connecting with an AIS connection type these users must exist in the dictionary. Any user who needs to use an AIS connection type will need to have Internet access enabled. This is configured on the User properties screen.

Enable Internet Access for User

Configure the Internet Address on the Client(s)

In order to connect to Advantage over the Internet from a client the client needs to know the IP address and Port to use when connecting to the server. This is specified in the ADS.INI file by specifying the INTERNET_IP and INTERNET_PORT settings for a given server name. The server name you wish to use becomes the heading for the section containing the IP and Port information.


Configure a Drive Letter Mapping

Since a client connected over the Internet cannot resolve any network shares you must either use a server-side alias or configure a drive letter mapping. The drive letter mapping is configured in the ADS.INI file under the Drives heading. The mapping must point to a share on the server name you specified when configuring the INTERNET_IP and INTERNET_PORT.


To connect the client specify the connection type to AIS or INTERNET and set the data path to the configured drive letter or server-side alias. An ADO.NET connection string would look like the following using the configuration above:

Data Source=J:\;ServerType=ADS_AIS_SERVER;User ID=Chris;Password=password;

Following these steps allows for successful connections to Advantage through the Internet.


Maayan said...

Another great post. Thanks.

I do have some related questions -

1. Our app uses free tables only, how would you recommend using AIS to access all these tables?

2. On a VPN connection - would you recommend setting up AIS or simply using standard ADS connections? and why.

3. I guess latency is the major cause for bad performance - do you have any tips on this?


Chris Franz said...


Thanks for the kind words. You bring up some good points that I will address in more detail in a future post.

Here are some quick answers:
1. Put a properly configured dictionary in the same directory with the tables. You can connect to this dictionary with an AIS connection and still access the free tables.

2. Over a VPN connection I would recommend using a Remote connection. You don't need the additional encryption provided by an AIS connection. You may get a performance boost by turning on compression though.

3. For best performance the application needs to be designed for a slow connection. This means transfering only the records you need for the application. I would recommend that you download the sample AIS application from Code Central on the Advantage Developer Zone.

Maayan said...


I look forward reading more tips on this in the future.

Unknown said...


I setup everything what you said but I am getting 6610 error. Let me know what to do.

I set AdsServerType=AIS in TAdsConnection component which one I have set either Alias Name of Connection String.

Please give TAdsConnection component full settings for AIS.


Unknown said...

Present my ads.ini file like this.


I set AdsServerType=AIS and AliasName=TestData in my TAdsConnection component and I enabled internet connection to the user in data dictionary.

Chris Franz said...


The most common cause of a 6610 error is a firewall issue. Make sure that you allow TCP/IP traffic in and out on port 7868. You may have to configure firewalls at both the client and server.
You could also take a look at this Tech-Tip about connecting to Advantage over a WAN. If you are still getting the error I would recommend contacting Advantage Technical Support

Unknown said...


I set off to firewall settings in my side and server side the firewall configured for 7868 but still getting error. Is my .ini and TAdsConnection component settings, OK?


Anonymous said...

I followed everything step by step but i'm stuck with 7083 and 6420. No help from: for me as there is too little information to troubleshoot the errors.