Hello,
could you help me to enable https (using certificate) on a Data Server as a DLL?
I tried but I did not success. Please help me
Hello, Angelo!
Thank you for reaching out to us.
Please note that Flexmonster Data Server DLL is distributed as a separate .NET module responsible for creating the Flexmonster API controllers that return the data to the client. This distribution type provides the ability to customize the Data Server. However, HTTPS configurations are not included in the DLL since the DLL library is not a standalone server solution. In such a case, HTTPS should be configured based on your application server.
We will be glad to hear your feedback.
Best Regards,
Maksym
Hi Maksym,
i resolved modifing below function in Program.cs :
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel(options => {
var port =5000;
var pfxFilePath =@"PATH";
// The password you specified when exporting the PFX file using OpenSSL.
// This would normally be stored in configuration or an environment variable;
// I've hard-coded it here just to make it easier to see what's going on.
var pfxPassword ="PASSWORD";
options.Listen(IPAddress.Any, port, listenOptions => {
// Enable support for HTTP1 and HTTP2 (required if you want to host gRPC endpoints)
listenOptions.Protocols = HttpProtocols.Http1;
// Configure Kestrel to use a certificate from a local .PFX file for hosting HTTPS
listenOptions.UseHttps(pfxFilePath, pfxPassword);
});
});
webBuilder.UseStartup<Startup>();
});
Hello, Angelo!
Thank you for your reply.
We are glad to hear that you were able to find a solution.
Feel free to contact us if any other questions arise.
Best Regards,
Maksym
This question is now closed