The problem is that on a Terminal Server each user gets their own Registry keys. So even if the correct Historian Server was configured in Workspace at the Terminal Server console, any other Terminal Server Users would not have this configured.
There are two resolutions. If you are using any version of iFIX prior to iFIX 5.0, and you do not have any of the following Historian SIMS installed:
then you must use the second resolution below.
Keep in mind that SIMs are cumulative, so any newer SIM may have the same changes that are part of one of the above SIMS.
If you look in the ReadMe file for your Historian SIM and see the following entry:
* User cannot connect to post 4.5 archiver due to new authentication protocol
then you must use the first option.
If you do not have this entry in the ReadMe file, then you should use the second option.
iFIX 5.0 & Later Resolution
There is now a new method to maintain common Historian configuration information on a Terminal Server.
This solution, which is only for iFIX 5.0 and later, with the iFIX50_40044 Workspace SIM, or another SIM which contains this change. As of the time of creating this article, this fix is only available for iFIX 5.0. This change will be incorporated in newer versions of iFIX in later SIMS.
It allows you to configure the FixUserPreferences.ini file which automatically copies this Registry information for you.
Add the “TSCommonHistConfig" entry in the FixUserPreferences.ini file under [Historian], This entry will manage the application of the Historian Server information to all Terminal Server clients. This value can be set to either 0 or 1.
Setting it to 0 will mean the TSUser needs to enter their own custom Historian configuration. They can do it manually in Workspace in their session.
Setting it to 1 will copy the Historian configuration from the Terminal Server console to all TSUsers. Any changes thereafter in a Terminal Server session will be ignored. Of course you must first configure the Historian Server information in Workspace prior to starting your iClientTS sessions.
Pre-iFIX 5.0 Resolution
In this solution you are creating a .REG file which contains the necessary Historian information and through the use of a .BAT file, writing these keys to each Terminal Server User when the log in.
The following steps will allow setup iFIX and Historian to work in a Microsoft Terminal Server environment where iFIX Workspace is used to plot historical data in a chart. The information below explains how to minimize time spent maintaining the configuration when there are many users.
Customers configuring 10 or more terminal server users have found it takes time to log into each Terminal Server user account and setup the default server and server aliases. The setup must be done in order to plot data, but there is no need to use the toolbar. All the toolbar does it setup registry keys.
The basic idea of this approach is to setup the necessary registry keys by merging a .REG file instead of using the Historian toolbar in Workspace. Later, to change things like adding a new Historian server or setting up a new Terminal Server user update the .REG file and merge it again.
The .REG file is merged when the user logs into a terminal server session. It will overwrite any servers or aliases or usernames or passwords that the user configured.
The steps that follow explain how to make a .REG file and then get it merged when the user logs in. The main thing it tells is what registry keys are needed. Use any registry merging mechanism.
Testing was done in iFIX 4.5 and Proficy Historian 3.1
- Get everything working by running iFIX right on the console of the Terminal Server. Use the iFIX toolbar to setup the alias and real server name. Make sure user can browse each Historian from Workspace. In the example Historian servers are called CPARCH1 and CPARCH2 and there alias' are Hist and Hist2.
- Export the "HKEY_CURRENT_USER\Software\Intellution, Inc." and save it as TwoServers.reg. Mine looks like this.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Intellution, Inc.\iHistorian\Servers] "DefaultServer"="CPARCH1"
[HKEY_CURRENT_USER\Software\Intellution, Inc.\iHistorian\Servers\Server1] "ConnectionTimeout"=dword:0000005a
[HKEY_CURRENT_USER\Software\Intellution, Inc.\iHistorian\Servers\Server2] "ConnectionTimeout"=dword:0000005a
[HKEY_CURRENT_USER\Software\Intellution, Inc.\ElectronicSignature] "Continuous User"=""
"Continuous User Counter"=dword:00000005
- Put the TwoServers.reg file into this folder on the terminal server.
C:\Documents and Settings\All Users\Shared Documents
Note: it may also show up as "C:\Documents and Settings\All Users\Documents"
- Right click on the file and choose Properties then switch to the security tab. Add the "Users" group and make sure that group has "Full Control". It could be done with reduced permissions but Full Control was chosen for this example.
- Create a Usrlogn1.cmd in the \windows\system32 and paste this into it:
regedit "C:\Documents and Settings\All Users\Documents\TwoServers.reg"
Make sure the usrlogon.cmd calls the Usrlogn1.cmd. It should call it by default unless something was changed.
- Shutdown iFIX on the console.
- Create a user u1 in the operating system and add it to the "Remote Desktop Users" group.
- Log into the Terminal Server as Remote Desktop session as user u1. There should be a message box asking if to merge the registry settings. Click Yes and it should put up another message box saying it was successful.
- Start workspace and see if a chart can be inserted and the historians browsed.
Giving the message box allows canceling the merge or will notify if the merge was successful. If the pop up is not wanted add a /s so that the Usrlogn1.cmd contains:
regedit /s "C:\Documents and Settings\All Users\Documents\TwoServers.reg"
This usrlogn1.cmd fires even when logging into the terminal server machine itself (into the console)
Any time it is needed to make changes, repeat the process of getting things working on the console session and then exporting the registry keys.