This may be a correct behavior, or a problem in the component - it depends on the circumstances. In general, your code should catch the UAException-s and handle them. They can occur for various reasons and can never be fully prevented - for example, when the server is down, or the network connection is broken, our methods will throw the UAException (or, return the exception in the results - depends on the particular method).
Has there been something that could cause it? (restarting the server etc.)? In such situations, getting (various kinds of) UAException is normal. In this particular case, the inner exception is somewhat unusual, so I would be interested in hearing what precisely you were doing.
Also, there have been changes and improvements in this area in Version 5.30. I strongly recommend to use this version unless for some reason you cannot use .NET Framework 4.5+.
One last comment (unrelated to this problem): We recommend to use namespace URIs ("nsu=...") instead of namespace indices ("ns=..."). The reason for it is that a generic OPC-UA server is allowed to change the namespace indices for its namespaces during the sessions, while the namespace URIs should stay constantly valid.
In order to make the information easily accessible, I am placing a copy of your picture and code to this post - below.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using OpcLabs.EasyOpc.UA;
using OpcLabs.EasyOpc.UA.Reactive;
namespace Opc_Test3
{
class Program
{
static void Main(string[] args)
{
TextWriter tw = new StreamWriter("data.txt");
int i = 0;
EasyUAClient euac1 = new EasyUAClient();
OpcLabs.EasyOpc.UA.UAAttributeData tabela1;
OpcLabs.EasyOpc.UA.UAAttributeData tabela2;
OpcLabs.EasyOpc.UA.UAAttributeData tabela3;
OpcLabs.EasyOpc.UA.UAAttributeData tabela4;
OpcLabs.EasyOpc.UA.UAAttributeData tabela5;
Console.WriteLine("Laczenie z serwerem OPC");
tabela1 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB1");
tabela2 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB2");
tabela3 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB3");
tabela4 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB4");
tabela5 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB5");
Console.WriteLine("Polaczenie: OK");
Console.WriteLine("Nacisnij ENTER by pobraæ dane");
if (Console.ReadKey(true).Key == ConsoleKey.Enter)
{
Console.WriteLine("POBIERA DANE...");
Console.WriteLine("Nacisnij dowolny klawisz by zakoñczyæ pobieranie danych");
//while (Console.ReadKey(true).Key != ConsoleKey.Spacebar)
while(!Console.KeyAvailable)
{
tabela1 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB1");
tabela2 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB2");
tabela3 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB3");
tabela4 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB4");
tabela5 = euac1.Read("opc.tcp://127.0.0.1:4840", "ns=4;s=MAIN.TAB5");
Int32[] tab1Vls = (Int32[])tabela1.Value;
Int32[] tab2Vls = (Int32[])tabela2.Value;
Int32[] tab3Vls = (Int32[])tabela3.Value;
Int32[] tab4Vls = (Int32[])tabela4.Value;
Int32[] tab5Vls = (Int32[])tabela5.Value;
for (i = 0; i < 1000; i++)
{
tw.WriteLine(string.Format("{0} {1} {2} {3} {4}", tab1Vls[i], tab2Vls[i], tab3Vls[i], tab4Vls[i], tab5Vls[i]));
}
}
tw.Close();
Console.WriteLine("Zakonczono");
}
}
}
}