Skip to content

Reference

OpcClient.ChangeUserIdentity Method

Changes the identity of the connected session to the identity specified without creating a new session (OPC 10000-4, ActivateSession).

Reference

OpcClient.ChangeUserIdentity Method ​

Type
OpcClient
Namespace
Opc.UaFx.Client
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Members
OpcClient Members
Also in
Opc.UaFx.Client

since v2.58

Changes the identity of the connected session to the identity specified without creating a new session (OPC 10000-4, ActivateSession).

csharp
public void ChangeUserIdentity(OpcUserIdentity identity)
vbnet
Public Sub ChangeUserIdentity(identity As OpcUserIdentity)

Parameters

NameTypeDescription
identityOpcUserIdentityThe OpcUserIdentity to use from now on or a null reference (Nothing in Visual Basic) to continue as an anonymous user.

Exceptions

ExceptionCondition
InvalidOperationExceptionThe method is currently not supported, because of the license has expired.
ObjectDisposedExceptionThe object has been disposed of.
OpcExceptionThe client is not connected (BadServerNotConnected) or the server rejected the identity, for example with BadUserAccessDenied or BadIdentityTokenRejected.

Remarks

On success the identity is also applied to the UserIdentity, so a later reconnect uses it too. If the server rejects the identity, the UserIdentity remains unchanged.