I have a .net core 2 API where i've connected a WCF service (which is an email sender);
The service is hosted on IIS with HTTPS and require SSL;
I want to pass the client certificate from the api whenever i make the connection to the email service.
I think the only solution is to change the reference.cs
file (which is not the best practice and i have no idea what should i change)
This is my startup.cs file; I made this because i want a dynamic url based on the environment
services.AddTransient<IEmailService, EmailServiceClient>((serviceProvider) =>
{
var configuration = serviceProvider.GetService<IConfiguration>();
var url = configuration.GetValue<string>("EmailServiceUrl");
return new EmailServiceClient(EmailServiceClient.EndpointConfiguration.WSHttpBinding_IEmailService, url);
});
Any suggestion