- Posts: 17
- Thank you received: 0
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.
Authentication error when writing
- SolutionNow
-
Topic Author
- Offline
- Elite Member
-
Please Log in or Create an account to join the conversation.
The server only has an endpoint that provides no UA security (as can be seen from the picture you provided). And, you want to authenticate the client-side user via the username/password authentication. This is an insecure combination, which should be avoided (and as such, is specifically addressed in OPC UA spec) - it means that the password would be sent in clear text on the wire, and can be eavesdropped. When user authentication is needed, the server should be configured to have encrypted endpoint(s) as well.
The UaExpert error message tries to tell you this - and you are overriding it.
In QuickOPC, (again this is just an educated guess), because the UAEndpointDescriptor you are passing in actually contains two user identity tokens - one "Anonymous", and the other with the user name and password - QuickOPC probably chooses the Anonymous one and does not actually end up using the username&password you provided. But since the server is configured to only allow connections from authenticated users, it rejects the Anonymous user.
Please try this: After the statement
put this:
Best regards
Please Log in or Create an account to join the conversation.
- SolutionNow
-
Topic Author
- Offline
- Elite Member
-
- Posts: 17
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- SolutionNow
-
Topic Author
- Offline
- Elite Member
-
- Posts: 17
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Now please back to question 3. You have explained what you do in the program. But, are you doing an equivalent of this when you test from UaExpert? That is, do you enter the username and password in the uaExpert as well?
Regards
Please Log in or Create an account to join the conversation.
- SolutionNow
-
Topic Author
- Offline
- Elite Member
-
- Posts: 17
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- SolutionNow
-
Topic Author
- Offline
- Elite Member
-
- Posts: 17
- Thank you received: 0
2. .NET Framework 4.6.2
4 (I'll answer this first as #3 is more complicated) Yes, we pass in a UserName and password like this:
Here you can see the parameter which I tried to write to (the first error message from my previous post):
The second endpoint is the method, and in fact I'm still not entirely clear when I call CallMethod() what endpoint is considered the MethodID and which is the MethodNodeID. There is a parent node QUEUE.XML:
with an endpoint that ends with i=3030. This parent node then has several child parameters and methods including the one I tried to call in the second error I posted below, the method Open:
which you can see has an endpoint ending with i=3042. Is it correct to set both the parameters methodID and methodNodeID with the endpoint ending with i=3042?
Please Log in or Create an account to join the conversation.
I have some additional questions.
1. Which QuickOPC version are you using?
2. Are you targeting .NET Framework, or .NET Core/.NET 5+?
3. In UAExpert, you are selecting from different endpoints (endpoint configurations) of the server. Can you please post here the picture of which server endpoints are available, and which one you are selecting? (or email it to support (at) opclabs.com if it contains anything confidential).
4. In UAExpert, are you entering a user name or password to authenticate, at any point along the way?
Best regards
Please Log in or Create an account to join the conversation.
- SolutionNow
-
Topic Author
- Offline
- Elite Member
-
- Posts: 17
- Thank you received: 0
I'm having difficulty writing values to an OPC Server. In general, I can read and monitor parameter values without any problem, but when I try to write to a parameter or call a method I'm getting authorization errors.
I am trying to replicate a process for writing to the server sent by the producer of the machine with the server that shows a step-by-step tutorial for writing using UAExpert. One suspicious step in this tutorial regards the authentication process, which after entering the username and password advises that UAExpert will show this warning dialog:
In UAExpert however, once this dialog is ignored, writing to parameters and calling methods works fine. With our program however I am getting first this error when writing to a parameter:
and then this error when calling the method:
I am only guessing that the authentication warning seen in UAExpert is creating problems here, is it possibile? Any alternatives I could test?
Thanks in advance
Please Log in or Create an account to join the conversation.