Login  •  Register


Error while connecting to server

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

Error while connecting to server

Postby sudhapc » 14 Feb 2019, 06:43

Hi Team,

I am trying to connect to my server from integration test(which is present in same server code).

However am getting this issue "UnifiedAutomation.UaBase.StatusException: Cannot send user credentials over an insecure connection
[The server does not provide a certificate which is required for encryption the password].
---> UnifiedAutomation.UaBase.StatusException: Cannot send user credentials over an insecure connection
[The server does not provide a certificate which is required for encryption the password].. "

When i try to connect to my server via opcuaExpert its working fine.

Client side code:

Am passing sessionname ,username and password as "one","validuser",string.empty

public static Session GetSession(string sessionName, string userName, string password)
{
var session = new Session(ApplicationInstance.Default) { SessionName = sessionName };
session.UserIdentity = new UserIdentity
{
IdentityType = UserIdentityType.UserName,
UserName = userName,
Password = password
};
session.AllowInsecureCredentials = true;
return session;
}

public static void ConnectToServer(Session session, string serverUrl)
{
session.Connect(serverUrl, SecuritySelection.None);
session.SessionTimeout = 600000;
Session = session;
}

In server side,right now am allowing anonymous login and ignoring checking password.
Even if i am connecting anonymously it is throwing same error.

I am facing this issue after taking latest version of opcua c# sdk version 2.6.1.422
sudhapc
Newbie
Newbie
 
Posts: 14
Joined: 16 Oct 2018, 12:47

Re: Error while connecting to server

Postby Support Team » 31 May 2019, 15:42

Hello,

The exception is thrown if the password would be sent in an insecure way. This is the case if the server does not have a certificate or the server does not send a nonce or sends a too short nonce for encrypting the password.
If the client needs to connect to the server, the client can implement the InsecureCredicals EventHandler.
Please have a look at the Authentication example in ClientGettingStarted.

If you still cannot connect, the please create a support ticket at our webform.
Best regards
Unified Automation Support Team
User avatar
Support Team
Hero Member
Hero Member
 
Posts: 2407
Joined: 18 Mar 2011, 15:09


Return to .NET based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 0 guests