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.

BadUserAccessDenied. Endpoint does not supported the user identity type provided

More
17 Jun 2021 07:26 #9771 by support
OK that's weird about the TLB import and we can look at it later if you like.

For now, can you please add event logging to your code, such as in opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ure%20-%20Event%20logging.html , combine it with your code, and post here all event entries - and your own output - that gets printed out?

Thank you

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

More
17 Jun 2021 07:22 #9770 by escarre
Hello,

I downloaded the 21.1 version but I tryed tho generate the TLB units to access the obtjects and I get this error: Error loading the type library/DLL(80029c4a)
But when I select then 2018 version, it's ok.

I only have to read a list of items and write in some of them.
I have another OPC server, without user and password access, and I get the values using ReadMultiple method.

Best regards,
Escarre

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

More
17 Jun 2021 07:05 #9768 by support
Hello,
before we go further - is there a reason you are using the 2018.3 version, and not a newer/the newest version?

The reason I am asking is because it is possible that the newer version will provide better error diagnostics.

Regards

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

More
16 Jun 2021 13:25 #9764 by escarre
Hi!

Thanks! now I get ahother error when I try to read the data:
ClienteOPCUA.Read(ReadArgument.EndpointDescriptor.UrlString, ReadArgument.NodeDescriptor.NodeId.ExpandedText);

The error message: Cannot lock the OPC-UA client session because it is not available. + The cliente method called was 'ReadMultiple'.

ClienteOPCUA is a TEasyUAClient object.

With this code I configured de user/password:
sessionParameters := ClienteOPCUA.IsolatedParameters.SessionParameters;
sessionParameters.EndpointSelectionPolicy.RequireAuthentication := True;
sessionParameters.EndpointSelectionPolicy.AllowedMessageSecurityModes := UAMessageSecurityModes_All;
sessionParameters.UserIdentity.UserNameTokenInfo.UserName := user;
sessionParameters.UserIdentity.UserNameTokenInfo.password := password;


And to every opc Item:
Maquina.Arguments[intVariableActual] := ReadArgument;
ReadArgument := CoUAReadArguments.Create;
ReadArgument.EndpointDescriptor.UrlString := strOPCServer;
ReadArgument.EndpointDescriptor.UserName := user;
ReadArgument.EndpointDescriptor.Password := password;
ReadArgument.NodeDescriptor.NodeId.ExpandedText := nodeId + OPCItem.Text;
ReadArgument.AttributeId := UAAttributeId_DataType;

Thanks!

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

More
16 Jun 2021 12:54 #9762 by support
Hello.

I do not know for sure what's wrong. But, setting .AllowedMessageSecurityModes to UAMessageSecurityModes_None is certainly wrong, so you should start there. This value does not allow any security mode and therefore no connection can be made.

You probably wanted to use UAMessageSecurityModes_SecurityNone, to specify that an insecure connection must be made. That would be a bit better. You can try it, but it won't work with many servers either, because, with username/password authentication, it would mean that the password would be transferred in clear text.

For this reason, many servers require encrypted connection with username/password. That would mean using UAMessageSecurityModes_SecuritySignAndEncrypt, or simply leaving it at the default, which is UAMessageSecurityModes_All.

Best regards

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

More
16 Jun 2021 11:11 #9759 by escarre
Hi,

I have the 2018.3 version. I use Delphi 10.3.
I entered this code to put the user/password information.

In SessionParameters:
sessionParameters := Maquina.ClienteOPCUA.IsolatedParameters.SessionParameters;
sessionParameters.EndpointSelectionPolicy.RequireAuthentication := True;
sessionParameters.EndpointSelectionPolicy.AllowedMessageSecurityModes := UAMessageSecurityModes_None;
sessionParameters.UserIdentity.UserNameTokenInfo.UserName := ParamStr2; // cservice
sessionParameters.UserIdentity.UserNameTokenInfo.password := ParamStr3; // paper


In EndPointDescription:

ReadArgument := CoUAReadArguments.Create;
ReadArgument.EndpointDescriptor.UrlString := strOPCServer;
ReadArgument.EndpointDescriptor.UserIdentity.UserNameTokenInfo.UserName := user;
ReadArgument.EndpointDescriptor.UserIdentity.UserNameTokenInfo.password := password;
ReadArgument.NodeDescriptor.NodeId.ExpandedText := nodeId + OPCItem.Text;
ReadArgument.AttributeId := UAAttributeId_Value;

What am I doing wrong?

Thanks,
Escarre

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

Moderators: support
Time to create page: 0.054 seconds