Login  •  Register


BadSecurityPolicyRejected error

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

BadSecurityPolicyRejected error

Postby sudhapc » 15 Feb 2019, 08:04

Hi Team,

I could see the below log while connecting to server.please help

12:32:16.965|0008|01|1|FindLicense failed because AddProcessLicenses was not called.
12:32:16.996|0025|04|4|GetUserIdentityToken: TokenType=UserName SecurityPolicyUri=http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256
12:32:17.010|0025|04|1|[BadSecurityPolicyRejected] Error during OnCreateSessionComplete.|StatusException|Cannot send user credentials over an insecure connection [The server does not provide a certificate which is required for encryption the password].
12:32:17.019|0025|04|4|CLOSE SESSION ON FAIL [opc.tcp://md1u5cvc:48030/]
12:32:17.067|0042|01|4|TCPCLIENTCHANNEL Shutdown Socket=00000000, ChannelId=2, TokenId=1, Reason=[BadConnectionClosed]BadConnectionClosed
12:32:17.075|0004|01|2|[Bad] Unexpected error during OnReadComplete,|SocketException|An existing connection was forcibly closed by the remote host
12:32:17.085|0010|04|1|[BadSecurityPolicyRejected] Error during EndConnect.|StatusException|Cannot send user credentials over an insecure connection [The server does not provide a certificate which is required for encryption the password].
12:32:17.093|0010|04|4|CONNECTION STATUS CHANGED: Disconnected opc.tcp://localhost:48030/
Exception thrown: 'UnifiedAutomation.UaBase.StatusException' in UnifiedAutomation.UaClient.dll
sudhapc
Newbie
Newbie
 
Posts: 14
Joined: 16 Oct 2018, 12:47

Re: BadSecurityPolicyRejected error

Postby Support Team » 31 May 2019, 15:48

Hello,

The server does not have a certificate asigned, so a password would be sent in an unsecure way. The client sdk will not send the client password in an insecure way by default. But you can implement the InsecureCredicals EventHander to be able to connect to the server. But hackers will be able to get your password.
Please see the Authentication example inClientGettingStarted
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