Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Access level does not allow reading or subscribing to the Node

More
20 Mar 2025 13:03 #13504 by support
I think the problem can be in the fact that for the subscribe, you are *not* providing user authentication. 

In the call to 
Code:
new EasyUAMonitoredItemArguments(Callback, null, serverUrl, nodeId, 1000)
, you pass in just the serverUrl, not the endpoint descriptor with the user name identity.

Best way would be to create the UAEndpointDescriptor just once, with the user identity, assign it to a variable, and then use it for both Read and Subscribe operations.

Best regards

Please Log in or Create an account to join the conversation.

More
19 Mar 2025 20:59 #13503 by aris
Yes, I'm able to read and read valid data with ReadMultiple. But when I try to subscribe to the same node the SubscribeMultipleMonitoredItems returns the subscription id, but the EasyUADataChangeNotificationEventArgs in callback has Succeeded=false and the Exception="OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadNotReadable}. The access level does not allow reading or subscribing to the Node."

Here is the code:

EasyUAClient.SharedParameters.EngineParameters.CertificateAcceptancePolicy = new OpcLabs.EasyOpc.UA.Engine.UACertificateAcceptancePolicy()
{
    AcceptAnyCertificate = true
};
var client = new EasyUAClient();
string serverUrl = "opc.tcp://192.168.214.1:4840";
var nodeId = "ns=2;s=/Channel/GeometricAxis/aaIwCorr[1]";

// ===== READ
var readRequests = new List<UAReadArguments>
{
    new(new UAEndpointDescriptor(serverUrl).WithUserNameIdentity("user", "password"), new UANodeDescriptor(nodeId)),
};

var values = client.ReadMultiple([.. readRequests]);

var monitoredItems = new List<EasyUAMonitoredItemArguments>()
{
    new EasyUAMonitoredItemArguments(Callback, null, serverUrl, nodeId, 1000)
};

// ===== SUBSCRIBE
var subResults = client.SubscribeMultipleMonitoredItems([.. monitoredItems]);
static void Callback(object sender, EasyUADataChangeNotificationEventArgs e)
{

}
 

Please Log in or Create an account to join the conversation.

More
19 Mar 2025 20:27 #13502 by support
Hello.

Are you saying that you were actually able to read the node, but get this error when trying to subscribe to the very same node?

Regards
 

Please Log in or Create an account to join the conversation.

More
19 Mar 2025 20:20 #13501 by aris
I enabled "AcceptAnyCertificate", but it seems I still cannot subscribe to a node. When I try to subscribe with "SubscribeMultipleMonitoredItems" I get the following error "OPC UA service result - {BadNotReadable}. The access level does not allow reading or subscribing to the Node.". Does this mean that I do need certificate or do I need to enable/allow something on UA Server?

EasyUAClient.SharedParameters.EngineParameters.CertificateAcceptancePolicy = new OpcLabs.EasyOpc.UA.Engine.UACertificateAcceptancePolicy()
{
    AcceptAnyCertificate = true
};
var opcClient = new EasyUAClient();

Please Log in or Create an account to join the conversation.

Moderators: supportvaclav.zaloudek
Time to create page: 0.149 seconds