You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, first of all, I would like to thank you for the first-class framework.
I work on a IOT Project in net7, that needs a Secure Mqtt Server. The connection should work with WSS and TCP.
I have written an Angular APP with the ngx-mqtt (javascsript lib)
The connection over WS and TCP (port 1883) workes, but the Secure WSS not.
I have generate a selfSigned certificate with opensssl.
When this workes i want to generate and import the certificate with letsencrypt if this is possible?
Here is my code
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseKestrel(option =>
{
option.ListenAnyIP(1883, l => l.UseMqtt());
option.ListenAnyIP(5001, listenOptions =>
{
var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var certPath = Path.Combine(path, "certificate.pfx");
var cert = new X509Certificate2(certPath, "12345");
listenOptions.UseHttps(cert);
});
option.ListenAnyIP(5005); // default HTTP Port
});
webBuilder.UseStartup<Startup>();
});
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, first of all, I would like to thank you for the first-class framework.
I work on a IOT Project in net7, that needs a Secure Mqtt Server. The connection should work with WSS and TCP.
I have written an Angular APP with the ngx-mqtt (javascsript lib)
The connection over WS and TCP (port 1883) workes, but the Secure WSS not.
I have generate a selfSigned certificate with opensssl.
When this workes i want to generate and import the certificate with letsencrypt if this is possible?
Here is my code
The Error message in Browser is this
What did I forget or done wrong in my implementationm?
Thanks
Markus
Beta Was this translation helpful? Give feedback.
All reactions