Closed himadrinath closed 4 years ago
I suppose you installed the nugget and for some reason it wasn't updated.
The source code currently has these 4 constructors:
You can either use the source code directly, or wait for us to look into this nugget update issue.
my version : 1.0.41
in this line using TLSv1_0 but mine is TLSv1_2 how can i change it..
@Florimond after using source code directly getting this
Unhandled Exception: System.ArgumentException: Library compiled without SSL support
at Emitter.MqttClient.Init(String brokerHostName, Int32 brokerPort, Boolean secure, X509Certificate caCert, X509Certificate clientCert, MqttSslProtocols sslProtocol, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback) in C:\Users\Himadri\Documents\Visual Studio 2017\Projects\Emitter_test\Emitter\MqttClient.cs:line 355
at Emitter.MqttClient..ctor(String brokerHostName, Int32 brokerPort, Boolean secure, X509Certificate caCert, X509Certificate clientCert, MqttSslProtocols sslProtocol, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback) in C:\Users\Himadri\Documents\Visual Studio 2017\Projects\Emitter_test\Emitter\MqttClient.cs:line 319
at Emitter.MqttClient..ctor(String brokerHostName, Int32 brokerPort, Boolean secure, MqttSslProtocols sslProtocol, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback) in C:\Users\Himadri\Documents\Visual Studio 2017\Projects\Emitter_test\Emitter\MqttClient.cs:line 300
at Emitter.Connection..ctor(String defaultKey, String broker, Int32 brokerPort, Boolean secure) in C:\Users\Himadri\Documents\Visual Studio 2017\Projects\Emitter_test\Emitter\Emitter.cs:line 98
at Emitter.Connection.Establish(String defaultKey, String broker, Int32 brokerPort, Boolean secure) in C:\Users\Himadri\Documents\Visual Studio 2017\Projects\Emitter_test\Emitter\Emitter.cs:line 176
The Emitter project needs to be built with "SSL" and "FX".
Note: I don't have Visual Studio on hand right now to check this information, but I think this is right.
@Florimond if i use SSL getting error if i use Fx getting error On using SSL
and using FX
its fixed. with little bit of changes this repo helped https://github.com/mohaqeq/M2MqttDotnetCore
unable to connect using tls. in node project its working like this
require('emitter-io').connect( {host: 'myhost.com', port: 443 , secure: true });
passing secure options but in C# connection has 3 parameters broker, brokerPort, defaultkey
how can i connect?