Open jfalameda opened 4 years ago
I noticed the content was served as HTTP despite the HTTPS initialization. I forced .NET to use TLSv1.2 and it worked on a single node. Now the problem I am facing is that in production only about 1 out of 5 times (approx.) I get response through HTTPS the rest are just plain HTTP responses. This is very confusing I am starting to think that this could be a Service fabric issue.
This is my configuration changes:
I added
var endpointDesc = serviceContext.CodePackageActivationContext.GetEndpoint(endpoint);
// Added to enforce TLSv1.2
opt.ConfigureHttpsDefaults(listenOptions =>
{
listenOptions.SslProtocols = SslProtocols.Tls12;
});
switch (endpointDesc.Protocol)
{
case EndpointProtocol.Http:
opt.Listen(IPAddress.Any, endpointDesc.Port);
break;
case EndpointProtocol.Https:
opt.Listen(IPAddress.Any, endpointDesc.Port, async listenOptions =>
{
try
{
var cert = await CertificateManager.GetCertificate(
"*****",
string.Empty
);
listenOptions.UseHttps(cert);
} catch
{
// TODO: Add logs
}
});
break;
default:
throw new ArgumentOutOfRangeException();
}
// Added as NoDelay property has been deprecated on .NET core 3.1
.UseSockets(x => {
x.NoDelay = true;
});
Cluster version: 7.1.456.9590 Managed cluster on Azure running on windows 2016.
Update: Forcing it to use TLSv1.2 just makes it work sometimes, even on a single node. So I suspect this is not a solution and that it was a coincidence it started working.
@javiercn
Hi,
We are using .NET core on an API gateway in combination with service fabric. As a result of upgrading .NET core from 2.0 to 3.1 https has stopped working.
This is an extra of a CURL call displaying the error:
Any ideas?
OS: Windows Server 2016 Service fabric:
Thanks, José.