user and pwd on ocp connection

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
manu0087
Jr. Member
Jr. Member
Posts: 1
Joined: 25 Mar 2022, 08:14

user and pwd on ocp connection

Post by manu0087 »

hi,
how can i set the user and pwd when i create a new session or when i connect to a OpcUa?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: user and pwd on ocp connection

Post by Support Team »

Hi,

frist read this:
https://documentation.unified-automation.com/uasdknet/3.1.1/html/L2ClientTutConsoleClient.html#L2ClientTutConsoleClient_Connection_Security

should be clear thereafter.
Best regards
Unified Automation Support Team

FuZi
Jr. Member
Jr. Member
Posts: 2
Joined: 04 Apr 2023, 11:59

Re: user and pwd on ocp connection

Post by FuZi »

Hi,

I implemented the user login like this:
https://documentation.unified-automation.com/uasdknet/3.1.0/html/L3ServerTuDemoServerUserAuth.html

However when i try to connect to the Server with UAExpert the connection is declined with a 'BadConfigutationError'
during ActivateSession. For this reason the Event SessionManager_ImpersonateUser is never called, it works fine with the anonymous login.
Can you provide some Information which config is needed to allow user and password connection?

FuZi
Jr. Member
Jr. Member
Posts: 2
Joined: 04 Apr 2023, 11:59

Re: user and pwd on ocp connection

Post by FuZi »

Got it:
https://documentation.unified-automation.com/uasdknet/2.1.0/html/L2BaseLibConfigSchema.html

Post Reply