ION Enterprise OPC Test Client
Kepware OPC Quick Client
Matrikon OPC Explorer
There is an extra file in the \ION Enterprise\system\bin folder that the ION OPC Server is erroneously using as its configuration file. This file is causing ION OPC Server to not function properly.
In \ION Enterprise\system\bin, you will find two files:
- ION.OpcDaServer.exe.config <- good config file - a short XML file
- ION.OpcDaServer.config <- bad config file - binary file
Delete the 2nd, bad config file.
Make a copy of the 1st, good config file. Rename it to the same name as the bad one (remove the ".exe" from the middle).
Restart OPC Server.
The root cause of this problem is that .NET applications are looking for config files with the wrong names. Normally, when a .NET application is started (like OPC Server), it automatically looks for a file name "<application name>.exe.config". i.e. The OPC server " ION.OpcServerDa.exe
" has an associated config file " ION.OpcServerDa.exe.config
This is a small XML file that has configuration info for the application - which version of the .NET framework it uses, regional settings, database connection info, etc.
On some machines, .NET applications seem to be looking for config files with the name "<application name>.config". No ".exe" in the middle. Speculation is that it might be a bug in .NET 2.0 SP1. This issue needs more investigation.
ION OPC Server tries to use " ION.OpcServerDa.config
" on startup, instead of the correct " ION.OpcServerDa.exe.config
". A file with this name does not normally appear on ION Enterprise systems. Our OPC Test Client (OpcTestClient.exe) creates this file when you browse the ION OPC Server, then click File->Save. It creates files with the name "<OPC Server it's connected to>.config" and stores the subscription info in it, for retrieval the next time you open it. It is a binary file that is not human-readable. ION OPC Server can not read this binary file, and interprets it as a corrupt config file.
This causes a very strange .NET Exception from normally reliable & robust code. "The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception." It's a very standard call to a .NET function, in one particular place of the OPC Server code, that is even used in several other places. There is no actual reason this exception should be thrown. Unfortunately, because of the place in code this exception is being thrown, it is not logged anywhere.
Because of the exception handling in this area of code, instead of halting and reporting that an exception has occurred, instead it just returns from the routine without some variables being set correctly. This code is in the function that determines whether an OPC tag represents an "Item" or a "Grouping Object". The fall-through exception handling causes every tag in the system to be incorrectly reported as a "Grouping Object", even if it is truly an "Item".