I have been trying to subscribe to tags on an OPC Server without any success, all avenues return "Access Denied" error as per the XML attachment. I've adapted the .NET Console samples "XmlLogger" as below and tried ALL 9 combinations of the 3 ClientParameters that affect security. I have another application written with a different library which can read the tag as can Matrikon Explorer and OPC Expert. Is there another setting in QuickOPC that I can try? Using version 5.54.1085.1.
static void Main()
{
EasyDAClient.SharedParameters.ClientParameters.TurnOffActivationSecurity = true;
EasyDAClient.SharedParameters.ClientParameters.TurnOffCallSecurity = true;
EasyDAClient.SharedParameters.ClientParameters.UseCustomSecurity = false;
Console.WriteLine("Starting up...");
var xmlSerializer = new XmlSerializer(typeof(EasyDAItemChangedEventArgs));
var xmlWriter = XmlWriter.Create("OpcData.xml", new XmlWriterSettings
{
Indent = true,
CloseOutput = true
});
// The root element can have any name you need, but the name below also allows reading the log back as .NET array
xmlWriter.WriteStartElement("ArrayOfEasyDAItemChangedEventArgs");
Console.WriteLine("Logging for 10 seconds...");
int handle = EasyDAClient.SharedInstance.SubscribeItem("192.1.1.1", "ArchestrA.DASSIDirect.3",
"Topics.Node1.dbl", 1000,
(_, eventArgs) =>
{
Debug.Assert(eventArgs != null);
xmlSerializer.Serialize(xmlWriter, eventArgs);
});
System.Threading.Thread.Sleep(10 * 1000);
Console.WriteLine("Shutting down...");
EasyDAClient.SharedInstance.UnsubscribeItem(handle);
xmlWriter.WriteEndElement(); // not really necessary - XmlWriter would write the end tag for us anyway
xmlWriter.Close();
Console.WriteLine("Finished.");
}