The Middle Tier is a Multiple Locations Option that isolates the database, improving speed and security by preventing client workstations from directly accessing the database. It runs very fast in a LAN, but is sluggish on a VPN. The server program sits between the database and the client machines. Workstations are ordinary thick clients running the full Windows version of Open Dental. Middle Tier is a useful option for large local networks that might be shared with non-users of Open Dental (like a college campus or hospital). It is not the same as a Web Version.
This diagram explains the 3-tier architecture used in enterprise settings.
- The business layer can be on the same physical computer as the database or on a dedicated server.
- The large arrows represent chatty connections.
- The thin arrows represent the slow connections for which the program has been optimized. Fewer calls are made across the slow connections.
Speed: The goal is to have only one call to the server for each 'page' of display on the screen. This single call will return a single dataset (group of tables) which is as small as possible. Eliminating multiple calls reduces latency (roundtrip time) issues, such as when connecting across a satellite connection. Keeping the result set small helps the program remain responsive even when the connection is slow (e.g. a dial-up connection).
Security: An advantage of using a Middle Tier is increased security. In a direct connection, the MySQL username and password must be stored on the client computer. But with a Middle Tier, the client doesn't need access to the MySQL username and password. There is still not any security for the OpenDentImages folder (A to Z folders). Each client must still have access to a shared OpenDentalImages folder to view items in the Images module. There are a few options:
- Local Access: If only a single location uses Middle Tier (e.g. as an added security measure), then providing normal local access is a solid option.
- Multiple Location Access: It is best to replicate the files (e.g. DFS replication) or access the OpenDentImages folder via VPN connection. This helps prevent inconsistencies when storing images and documents.
Although it is not shown above, multiple clients can connect through either of the two methods and both connection methods can be used simultaneously. In fact, a direct connection is required when updating versions, and this requirement is satisfied by running the OpenDental.exe directly on the Middle Tier server.
Check Before Setup
You will need to install and perform updates directly from the Middle Tier server. Any attempt to perform an update from another computer will give the user an error message. If you are also using the HL7 Service, also refer to Update Sequence.
These items must be checked before you begin setting up Middle Tier.
- Locate the OpenDentImages folder (e.g. \\MyServer\OpenDentImages\), then run Setup.exe. This ensures all the correct libraries and folders are installed.
- Ensure that Open Dental can connect to the production database on the selected Middle Tier server.
- In the production database, click Setup, Miscellaneous. Change the Update Server Name to match the Middle Tier server.
- Open Dental does not offer support for MySQL user and password setup. See MySQL Security if you require strong MySQL security.
Performed directly on the Middle Tier server. Log in as an administrative user.
- Download this file (right click, Save As): OpenDentalServerConfig.xml, and place it in the application directory of Open Dental on the Middle Tier server. Edit the file (right click, "Open with..." Notepad) to set the users and passwords.
If you do not have MySQL users/passwords set up, use "root" for the User and leave the password blank.
- (Skip this step if you are using Windows Server Web Edition.) Open the Windows Features menu. Enable the Internet Information Services (IIS) features exactly as shown below. If you are a power user, select the IIS features you need.
Note: Make sure the boxes are marked with a check, not solid blue.
- Open the IIS Management Console:
Right click on My Computer, Manage.
b. On Windows Server Web, click Roles, Web Service Name, Internet Information Services. Do not use the second IIS option further down for the older IIS 6.0.
c. Expand Connections and click Application Pools.
d. Right click DefaultAppPool, Advanced Settings.
e. Ensure the .NET CLR Version is 4.0 and that "Enable 32-Bit Applications" is True.
f. Click OK.
- In Connections, right-click Default Website, Add Application.
The Alias determines how you refer to the connection in your URI. This can be anything, but the physical path needs to point to the Open Dental application folder.
- (Skip this step if English U.S. is your culture setting on all servers and workstations). If using foreign languages on your clients, you must set the language on the server to be the same.
Click on OpenDentalServer, then double click .NET Globalization.
b. Set the Culture and UI Culture languages to match.
- (Skip if using Windows Server 2012 or newer). Register .Net Framework v4.0 with IIS as follows:
You should now be able to connect to your Middle Tier service from any computer on your local network.
- When connecting from a client workstation, the Choose Database window will look similar to this. Test this on the server first, then on workstations. If you are unsure what to use for your URI, see What is my URI? in Troubleshooting below.
The above connections settings will be used from other workstations, but not from the Middle Tier server. After the initial testing, the upper direct connection settings will be used anytime you are on the server. This is required in order to perform version Updates.
- When you run Open Dental as Administrator and connect via Middle Tier, you should have a FreeDentConfig file in your application folder similar to the image below. This file should replace the existing .xml file on all your workstations.
Additional Setup Options
Security Certificates (Middle Tier across internet)
Hosting Multiple Databases from One Web Server
What is my URI?
The URI is composed of four parts:
- Protocol: You will use http:// if you're using a VPN or local network connection to secure your transmissions. If you're using Middle Tier across the internet, you will need to set up security certificates and your URI will begin with https://
- Server: The next section will be the name or IP address of the computer that is acting as your Middle Tier server.
- Alias: After the computer name you will use the Alias you set for the service.
- File: The last section does not change. It is ServiceMain.asmx.
For example: http://MyMiddleTierServer/AliasName/ServiceMain.asmx.
- Could not load file
- Could not create type
These errors are an indicator that "Enable 32-Bit Applications" is turned off. Refer to step 3e.
Time Zone Issue
Some issues can arise when using a Middle Tier server between different time zones. See Time Zones.