OPCFoundation / UA-.NET-Legacy

OPC Foundation Unified Architecture .NET Reference Implementations
330 stars 298 forks source link

OPC UA Data Access Sample Client #191

Open DmitryFarberov opened 4 years ago

DmitryFarberov commented 4 years ago

I connect to a server and create a monitored item. I then disconnect and repeat the steps. When I attempt to monitor the exact same item I get this:

**_EXCEPTION (ObjectDisposedException)

Cannot access a disposed object.Object name: 'TransportChannel is not available.'. STACK TRACE at Opc.Ua.ClientBase.get_UseTransportChannel()at Opc.Ua.SessionClient.CreateMonitoredItems(RequestHeader requestHeader, UInt32 subscriptionId, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequestCollection itemsToCreate, MonitoredItemCreateResultCollection& results, DiagnosticInfoCollection& diagnosticInfos)at Opc.Ua.Client.Subscription.CreateItems()at Opc.Ua.Client.Subscription.ApplyChanges()at Quickstarts.DataAccessClient.MainForm.Browse_MonitorMIClick(Object sender, EventArgs e) in D:\Sourcetree\OPC UA\UA-.NETStandard\SampleApplications\Workshop\DataAccess\Client\MainForm.cs:line 586**

If I exit the client and try again, it will work the first time around.