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
Error while connecting to server
Moderator: uasdknet
- Support Team
- Hero Member
- Posts: 3071
- Joined: 18 Mar 2011, 15:09
Re: Error while connecting to server
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.
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
Unified Automation Support Team