Quantcast
Channel: OPC Labs - OPC Labs - Recent Topics - OPC Labs Online Forums
Viewing all articles
Browse latest Browse all 1794

BadUserAccessDenied. Endpoint does not supported the user identity type provided - by: escarre

$
0
0
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

Viewing all articles
Browse latest Browse all 1794