Hello,
I am following the tutorial for HP Server "How to create a create a new project with a method", but when I call the method I get the error "BadUserAccessDenied" at UaExpert, and uaserver_call_utility_check_permission: object=ns=2; i = 5007 is not executable by the user at the output after running the program. This is the nodeid for my object, where the method is a component. I noticed that the provider_prefix_myobjecttype_methods.c file shown in the tutorial and the file generated by the UaModeler is different, and taken it into account, but the error still persists.
BadUserAccessDenied
Moderator: uamodeler
- Support Team
- Hero Member
- Posts: 3078
- Joined: 18 Mar 2011, 15:09
Re: BadUserAccessDenied
Hi,
can't see any error here, the status code is very clear telling you that the user-context you have used when creating the session is not allowed to call this method. Typically all "manipulative" operations e.g writing to a node or executing a method should require certain role-permissions e.g. operator or administrator. However, an "anonymous" user (guest) should only have permission to read the value of a node, but certainly not allow "manipulative operation".
The OPC Specification has a concept called "authorization".
https://documentation.unified-automation.com/uasdkhp/1.7.1/html/arch_authorization.html
The HP demo server has some preconfigured users and roles that you may want to use for testing e.g john/master.
Note: Your real server should (of course) contain different people.
can't see any error here, the status code is very clear telling you that the user-context you have used when creating the session is not allowed to call this method. Typically all "manipulative" operations e.g writing to a node or executing a method should require certain role-permissions e.g. operator or administrator. However, an "anonymous" user (guest) should only have permission to read the value of a node, but certainly not allow "manipulative operation".
The OPC Specification has a concept called "authorization".
https://documentation.unified-automation.com/uasdkhp/1.7.1/html/arch_authorization.html
The HP demo server has some preconfigured users and roles that you may want to use for testing e.g john/master.
Note: Your real server should (of course) contain different people.
Best regards
Unified Automation Support Team
Unified Automation Support Team