Traeger-GmbH / opcuanet-samples

Sample projects for C#, VB.NET and C++/CLI to guide developers using our OPC UA .NET SDKs.
https://opcua.traeger.de
MIT License
88 stars 39 forks source link

Client Not Connecting with Mode Encrpyt and Sign And Algorithm is SHa256Basic #8

Open RAJEEV2510 opened 1 year ago

RAJEEV2510 commented 1 year ago

: 'Error establishing a connection: Error received from remote host: An error occurred verifying security.' Showing This Error

katHamp commented 1 year ago

Hi RAJEEV2510, thanks for creating this issue! The server may be refusing the connection because it is rejecting the client's certificate. Please test for your server if the connection is allowed when you move the certificate from the "Rejected" folder (in CertificateStores) to the "Trusted" folder.

RAJEEV2510 commented 1 year ago

Yes, I did the server configuration properly but not working,it's working with none security.Pls share your code

katHamp commented 1 year ago

It seems to be a server side issue with the settings. Please query the endpoints of the server with the OpcDiscoveryClient, e.g. by using the following code:

using var discoveryClient = new OpcDiscoveryClient("opc.tcp://192.168.0.116:4840"); var endpoints = discoveryClient.DiscoverEndpoints(); foreach (var endpoint in endpoints) { Console.WriteLine(endpoint.Url + " - Policy: " + endpoint.Policy.Uri + ", Mode: " + endpoint.Policy.Mode); }

You can also send us a sample code of your application, then we can reconstruct your problem. For this, please contact support@traeger.de.